diff options
author | Abhishek Kulkarni <adkulkar@umail.iu.edu> | 2009-09-22 18:34:05 +0200 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@strongmad.austin.ibm.com> | 2009-09-23 20:03:46 +0200 |
commit | 7549ae3e81cc45908cbeee54a52b24f247fb0a2d (patch) | |
tree | cda0ffbb0f5025375ecd48e828d757283e075da8 /fs/9p/vfs_file.c | |
parent | MN10300: Handle removal of struct uart_info (diff) | |
download | linux-7549ae3e81cc45908cbeee54a52b24f247fb0a2d.tar.xz linux-7549ae3e81cc45908cbeee54a52b24f247fb0a2d.zip |
9p: Use the i_size_[read, write]() macros instead of using inode->i_size directly.
Change all occurrence of inode->i_size with i_size_read() or i_size_write()
as appropriate.
Signed-off-by: Abhishek Kulkarni <adkulkar@umail.iu.edu>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
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) return err; } if (omode & P9_OTRUNC) { - inode->i_size = 0; + i_size_write(inode, 0); inode->i_blocks = 0; } if ((file->f_flags & O_APPEND) && (!v9fs_extended(v9ses))) @@ -239,9 +239,9 @@ v9fs_file_write(struct file *filp, const char __user * data, *offset += total; } - if (*offset > inode->i_size) { - inode->i_size = *offset; - inode->i_blocks = (inode->i_size + 512 - 1) >> 9; + if (*offset > i_size_read(inode)) { + i_size_write(inode, *offset); + inode->i_blocks = (i_size_read(inode) + 512 - 1) >> 9; } if (n < 0) |