Commit 27f7db2c authored by Linus Torvalds's avatar Linus Torvalds Committed by Linus Torvalds

Clean up do_truncate due notify_change() locking change

parent fe2bd67c
......@@ -73,8 +73,6 @@ asmlinkage long sys_fstatfs(unsigned int fd, struct statfs * buf)
int do_truncate(struct dentry *dentry, loff_t length)
{
struct inode *inode = dentry->d_inode;
int error;
struct iattr newattrs;
/* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */
......@@ -83,8 +81,7 @@ int do_truncate(struct dentry *dentry, loff_t length)
newattrs.ia_size = length;
newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
error = notify_change(dentry, &newattrs);
return error;
return notify_change(dentry, &newattrs);
}
static inline long do_sys_truncate(const char * path, loff_t length)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment