Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347795
b: refs/heads/master
c: 46f6955
h: refs/heads/master
i:
  347793: 10585eb
  347791: 9234429
v: v3
  • Loading branch information
Marco Stornelli authored and Al Viro committed Dec 20, 2012
1 parent 206e34a commit a145cff
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cfac4b47c664e207740880d6492938761c53d74b
refs/heads/master: 46f69557103e11fb963ae5c98b7777e90493241b
7 changes: 0 additions & 7 deletions trunk/fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 1 addition & 8 deletions trunk/fs/proc/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 0 additions & 7 deletions trunk/fs/proc/proc_sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a145cff

Please sign in to comment.