]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
procfs: drop vmtruncate
authorMarco Stornelli <marco.stornelli@gmail.com>
Sat, 15 Dec 2012 10:48:48 +0000 (11:48 +0100)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 20 Dec 2012 19:00:01 +0000 (14:00 -0500)
Removed vmtruncate

Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/proc/base.c
fs/proc/generic.c
fs/proc/proc_sysctl.c

index 5a5a0be40e405f4693bad85fcc7d04703b362523..9b43ff77a51ed3b0383f3e96489e1e542331555a 100644 (file)
@@ -542,13 +542,6 @@ int proc_setattr(struct dentry *dentry, struct iattr *attr)
        if (error)
                return error;
 
-       if ((attr->ia_valid & ATTR_SIZE) &&
-           attr->ia_size != i_size_read(inode)) {
-               error = vmtruncate(inode, attr->ia_size);
-               if (error)
-                       return error;
-       }
-
        setattr_copy(inode, attr);
        mark_inode_dirty(inode);
        return 0;
index 7b3ae3cc0ef9ae34da5ece6dd63d550042e4b1b5..2e4ed13b9eedeeb53e3718d153c45227688a518f 100644 (file)
@@ -261,16 +261,9 @@ static int proc_notify_change(struct dentry *dentry, struct iattr *iattr)
        if (error)
                return error;
 
-       if ((iattr->ia_valid & ATTR_SIZE) &&
-           iattr->ia_size != i_size_read(inode)) {
-               error = vmtruncate(inode, iattr->ia_size);
-               if (error)
-                       return error;
-       }
-
        setattr_copy(inode, iattr);
        mark_inode_dirty(inode);
-       
+
        de->uid = inode->i_uid;
        de->gid = inode->i_gid;
        de->mode = inode->i_mode;
index 701580ddfcc3c20a4476fe88a9e736b54ca7b858..1827d88ad58b2ea1ec0fb7aa7f4ad7fdc3277fff 100644 (file)
@@ -736,13 +736,6 @@ static int proc_sys_setattr(struct dentry *dentry, struct iattr *attr)
        if (error)
                return error;
 
-       if ((attr->ia_valid & ATTR_SIZE) &&
-           attr->ia_size != i_size_read(inode)) {
-               error = vmtruncate(inode, attr->ia_size);
-               if (error)
-                       return error;
-       }
-
        setattr_copy(inode, attr);
        mark_inode_dirty(inode);
        return 0;