mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
2b1e55c389
commit
f17c20dd2e
7 changed files with 21 additions and 21 deletions
|
@ -2044,7 +2044,7 @@ int ocfs2_write_end_nolock(struct address_space *mapping,
|
|||
|
||||
out_write_size:
|
||||
pos += copied;
|
||||
if (pos > inode->i_size) {
|
||||
if (pos > i_size_read(inode)) {
|
||||
i_size_write(inode, pos);
|
||||
mark_inode_dirty(inode);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue