diff options
Diffstat (limited to 'fs/9p/vfs_file.c')
-rw-r--r-- | fs/9p/vfs_file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 68bf2af6c389..de7690eec4d8 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c | |||
@@ -72,7 +72,7 @@ int v9fs_file_open(struct inode *inode, struct file *file) | |||
72 | return err; | 72 | return err; |
73 | } | 73 | } |
74 | if (omode & P9_OTRUNC) { | 74 | if (omode & P9_OTRUNC) { |
75 | inode->i_size = 0; | 75 | i_size_write(inode, 0); |
76 | inode->i_blocks = 0; | 76 | inode->i_blocks = 0; |
77 | } | 77 | } |
78 | if ((file->f_flags & O_APPEND) && (!v9fs_extended(v9ses))) | 78 | if ((file->f_flags & O_APPEND) && (!v9fs_extended(v9ses))) |
@@ -239,9 +239,9 @@ v9fs_file_write(struct file *filp, const char __user * data, | |||
239 | *offset += total; | 239 | *offset += total; |
240 | } | 240 | } |
241 | 241 | ||
242 | if (*offset > inode->i_size) { | 242 | if (*offset > i_size_read(inode)) { |
243 | inode->i_size = *offset; | 243 | i_size_write(inode, *offset); |
244 | inode->i_blocks = (inode->i_size + 512 - 1) >> 9; | 244 | inode->i_blocks = (i_size_read(inode) + 512 - 1) >> 9; |
245 | } | 245 | } |
246 | 246 | ||
247 | if (n < 0) | 247 | if (n < 0) |