From 27f7db2c57d2d4ca02b6a922989d87285b716898 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 4 Apr 2002 16:44:44 -0800 Subject: [PATCH] Clean up do_truncate due notify_change() locking change --- fs/open.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/open.c b/fs/open.c index c6db81686f2b..820fef8a609b 100644 --- a/fs/open.c +++ b/fs/open.c @@ -73,8 +73,6 @@ out: 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) -- 2.39.5