summaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorMarco Stornelli <marco.stornelli@gmail.com>2012-12-15 11:48:48 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2012-12-20 14:00:01 -0500
commit46f69557103e11fb963ae5c98b7777e90493241b (patch)
tree94aa3fb8c7f6b6dd10f7f43a81ddcc4946f0c0de /fs/proc
parentcfac4b47c664e207740880d6492938761c53d74b (diff)
downloadop-kernel-dev-46f69557103e11fb963ae5c98b7777e90493241b.zip
op-kernel-dev-46f69557103e11fb963ae5c98b7777e90493241b.tar.gz
procfs: drop vmtruncate
Removed vmtruncate Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/base.c7
-rw-r--r--fs/proc/generic.c9
-rw-r--r--fs/proc/proc_sysctl.c7
3 files changed, 1 insertions, 22 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 5a5a0be..9b43ff77 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -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;
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 7b3ae3c..2e4ed13 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -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;
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 701580d..1827d88 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -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;
OpenPOWER on IntegriCloud