Commit b1c56a9b authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ncpfs_setattr() retval fix

ncpfs is failing to propagate the inode_setattr return value.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 774254f6
...@@ -873,7 +873,9 @@ int ncp_notify_change(struct dentry *dentry, struct iattr *attr) ...@@ -873,7 +873,9 @@ int ncp_notify_change(struct dentry *dentry, struct iattr *attr)
tmpattr.ia_valid = ATTR_MODE; tmpattr.ia_valid = ATTR_MODE;
tmpattr.ia_mode = attr->ia_mode; tmpattr.ia_mode = attr->ia_mode;
inode_setattr(inode, &tmpattr); result = inode_setattr(inode, &tmpattr);
if (result)
goto out;
} }
} }
#endif #endif
...@@ -899,13 +901,17 @@ int ncp_notify_change(struct dentry *dentry, struct iattr *attr) ...@@ -899,13 +901,17 @@ int ncp_notify_change(struct dentry *dentry, struct iattr *attr)
closing the file */ closing the file */
ncp_inode_close(inode); ncp_inode_close(inode);
result = ncp_make_closed(inode); result = ncp_make_closed(inode);
if (result)
goto out;
{ {
struct iattr tmpattr; struct iattr tmpattr;
tmpattr.ia_valid = ATTR_SIZE; tmpattr.ia_valid = ATTR_SIZE;
tmpattr.ia_size = attr->ia_size; tmpattr.ia_size = attr->ia_size;
inode_setattr(inode, &tmpattr); result = inode_setattr(inode, &tmpattr);
if (result)
goto out;
} }
} }
if ((attr->ia_valid & ATTR_CTIME) != 0) { if ((attr->ia_valid & ATTR_CTIME) != 0) {
......
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