Skip to content

Commit bf59e66

Browse files
josephhztorvalds
authored andcommitted
ocfs2: clean up unused local variables in ocfs2_file_write_iter
Since commit 86b9c6f ("ocfs2: remove filesize checks for sync I/O journal commit") removes filesize checks for sync I/O journal commit, variables old_size and old_clusters are not actually used any more. So clean them up. Signed-off-by: Joseph Qi <joseph.qi@huawei.com> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 372a447 commit bf59e66

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

fs/ocfs2/file.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,8 +2262,6 @@ static ssize_t ocfs2_file_write_iter(struct kiocb *iocb,
22622262
ssize_t written = 0;
22632263
ssize_t ret;
22642264
size_t count = iov_iter_count(from), orig_count;
2265-
loff_t old_size;
2266-
u32 old_clusters;
22672265
struct file *file = iocb->ki_filp;
22682266
struct inode *inode = file_inode(file);
22692267
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
@@ -2367,13 +2365,6 @@ static ssize_t ocfs2_file_write_iter(struct kiocb *iocb,
23672365
ocfs2_iocb_set_unaligned_aio(iocb);
23682366
}
23692367

2370-
/*
2371-
* To later detect whether a journal commit for sync writes is
2372-
* necessary, we sample i_size, and cluster count here.
2373-
*/
2374-
old_size = i_size_read(inode);
2375-
old_clusters = OCFS2_I(inode)->ip_clusters;
2376-
23772368
/* communicate with ocfs2_dio_end_io */
23782369
ocfs2_iocb_set_rw_locked(iocb, rw_level);
23792370

0 commit comments

Comments
 (0)