diff options
author | Junxiao Bi <junxiao.bi@oracle.com> | 2013-09-11 17:19:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-11 18:56:30 -0400 |
commit | f17c20dd2ec81e8ff328b81bc847da9429d0975b (patch) | |
tree | 288ff70d8c78e14f51dde033921ee0bc7072e4cd /fs/ocfs2/quota_global.c | |
parent | 2b1e55c389105b722cccadfa47f5615f57d8887f (diff) |
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/quota_global.c')
-rw-r--r-- | fs/ocfs2/quota_global.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c index 332a281f217e..aaa50611ec66 100644 --- a/fs/ocfs2/quota_global.c +++ b/fs/ocfs2/quota_global.c | |||
@@ -234,7 +234,7 @@ ssize_t ocfs2_quota_write(struct super_block *sb, int type, | |||
234 | len = sb->s_blocksize - OCFS2_QBLK_RESERVED_SPACE - offset; | 234 | len = sb->s_blocksize - OCFS2_QBLK_RESERVED_SPACE - offset; |
235 | } | 235 | } |
236 | 236 | ||
237 | if (gqinode->i_size < off + len) { | 237 | if (i_size_read(gqinode) < off + len) { |
238 | loff_t rounded_end = | 238 | loff_t rounded_end = |
239 | ocfs2_align_bytes_to_blocks(sb, off + len); | 239 | ocfs2_align_bytes_to_blocks(sb, off + len); |
240 | 240 | ||
@@ -778,8 +778,8 @@ static int ocfs2_acquire_dquot(struct dquot *dquot) | |||
778 | */ | 778 | */ |
779 | WARN_ON(journal_current_handle()); | 779 | WARN_ON(journal_current_handle()); |
780 | status = ocfs2_extend_no_holes(gqinode, NULL, | 780 | status = ocfs2_extend_no_holes(gqinode, NULL, |
781 | gqinode->i_size + (need_alloc << sb->s_blocksize_bits), | 781 | i_size_read(gqinode) + (need_alloc << sb->s_blocksize_bits), |
782 | gqinode->i_size); | 782 | i_size_read(gqinode)); |
783 | if (status < 0) | 783 | if (status < 0) |
784 | goto out_dq; | 784 | goto out_dq; |
785 | } | 785 | } |