Skip to contentSkip to conversation

ncpfs_setattr() retval fix

PATCH In review [email protected] 1 participant 1 message Jun 26, 2004 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 5/6 ncpfs_setattr() retval fix

ncpfs is failing to propagate the inode_setattr return value.

---

 25-akpm/fs/ncpfs/inode.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
fs/ncpfs/inode.c renamed from fs/ncpfs/inode.c~ncpfs_setattr-retval-fix +8 -2
diff -puN fs/ncpfs/inode.c~ncpfs_setattr-retval-fix fs/ncpfs/inode.c
@@ -873,7 +873,9 @@ int ncp_notify_change(struct dentry *den
 				tmpattr.ia_valid = ATTR_MODE;
 				tmpattr.ia_mode = attr->ia_mode;
 
-				inode_setattr(inode, &tmpattr);
+				result = inode_setattr(inode, &tmpattr);
+				if (result)
+					goto out;
 			}
 		}
 #endif
@@ -899,13 +901,17 @@ int ncp_notify_change(struct dentry *den
 		   closing the file */
 		ncp_inode_close(inode);
 		result = ncp_make_closed(inode);
+		if (result)
+			goto out;
 		{
 			struct iattr tmpattr;
 			
 			tmpattr.ia_valid = ATTR_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) {

_