aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-06-05 00:12:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-06-05 00:12:39 -0400
commit7f0d384cafabfbb56663ee6944c18fc0450fc5d6 (patch)
treebf68721fb65b64392177f498a9ba61ef027b2b3d /mm
parent90ec7819737d42a0ad1c2df1ff56016facae3c6e (diff)
parent01afaf61983d08ed1c9e5e8f2fcf4f40e9008033 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: Minix: Clean up left over label fix truncate inode time modification breakage fix setattr error handling in sysfs, configfs fcntl: return -EFAULT if copy_to_user fails wrong type for 'magic' argument in simple_fill_super() fix the deadlock in qib_fs mqueue doesn't need make_bad_inode()
Diffstat (limited to 'mm')
-rw-r--r--mm/shmem.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index 7e5030ae18ff..f65f84062db5 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -764,10 +764,11 @@ done2:
764static int shmem_notify_change(struct dentry *dentry, struct iattr *attr) 764static int shmem_notify_change(struct dentry *dentry, struct iattr *attr)
765{ 765{
766 struct inode *inode = dentry->d_inode; 766 struct inode *inode = dentry->d_inode;
767 loff_t newsize = attr->ia_size;
767 int error; 768 int error;
768 769
769 if (S_ISREG(inode->i_mode) && (attr->ia_valid & ATTR_SIZE)) { 770 if (S_ISREG(inode->i_mode) && (attr->ia_valid & ATTR_SIZE)
770 loff_t newsize = attr->ia_size; 771 && newsize != inode->i_size) {
771 struct page *page = NULL; 772 struct page *page = NULL;
772 773
773 if (newsize < inode->i_size) { 774 if (newsize < inode->i_size) {