diff options
author | Junxiao Bi <junxiao.bi@oracle.com> | 2013-09-11 14:19:45 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-11 15:56:30 -0700 |
commit | f17c20dd2ec81e8ff328b81bc847da9429d0975b (patch) | |
tree | 288ff70d8c78e14f51dde033921ee0bc7072e4cd /fs/ocfs2/move_extents.c | |
parent | 2b1e55c389105b722cccadfa47f5615f57d8887f (diff) | |
download | op-kernel-dev-f17c20dd2ec81e8ff328b81bc847da9429d0975b.zip op-kernel-dev-f17c20dd2ec81e8ff328b81bc847da9429d0975b.tar.gz |
ocfs2: use i_size_read() to access i_size
Though ocfs2 uses inode->i_mutex to protect i_size, there are both
i_size_read/write() and direct accesses. Clean up all direct access to
eliminate confusion.
Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Jie Liu <jeff.liu@oracle.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>
Diffstat (limited to 'fs/ocfs2/move_extents.c')
-rw-r--r-- | fs/ocfs2/move_extents.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/move_extents.c b/fs/ocfs2/move_extents.c index 452068b..4159285 100644 --- a/fs/ocfs2/move_extents.c +++ b/fs/ocfs2/move_extents.c @@ -845,7 +845,7 @@ static int __ocfs2_move_extents_range(struct buffer_head *di_bh, struct ocfs2_move_extents *range = context->range; struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); - if ((inode->i_size == 0) || (range->me_len == 0)) + if ((i_size_read(inode) == 0) || (range->me_len == 0)) return 0; if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) |