]> git.hungrycats.org Git - linux/commitdiff
[PATCH] tmpfs 6/7 write i_size_write
authorAndrew Morton <akpm@osdl.org>
Wed, 22 Oct 2003 01:20:33 +0000 (18:20 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 22 Oct 2003 01:20:33 +0000 (18:20 -0700)
From: Hugh Dickins <hugh@veritas.com>

mm/shmem.c was converted to i_size_read in -test1, and the remaining
references to a file's naked i_size are safely protected by i_sem;
but surely shmem_file_write must use i_size_write to update i_size.

mm/shmem.c

index 9000d1e5967362c215fefa782af06db4b286eb88..6dd3a4a3f86e570be701f424e0626528dc5bb093 100644 (file)
@@ -1239,7 +1239,7 @@ shmem_file_write(struct file *file, const char __user *buf, size_t count, loff_t
                pos += bytes;
                buf += bytes;
                if (pos > inode->i_size)
-                       inode->i_size = pos;
+                       i_size_write(inode, pos);
 
                flush_dcache_page(page);
                set_page_dirty(page);