linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 5/6] ncpfs_setattr() retval fix
@ 2004-06-26 22:00 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2004-06-26 22:00 UTC (permalink / raw)
  To: mason; +Cc: shaggy, sfrench, vandrove, zippel, agruen, linux-fsdevel, akpm



ncpfs is failing to propagate the inode_setattr return value.

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/fs/ncpfs/inode.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff -puN fs/ncpfs/inode.c~ncpfs_setattr-retval-fix fs/ncpfs/inode.c
--- 25/fs/ncpfs/inode.c~ncpfs_setattr-retval-fix	2004-06-26 14:44:14.862847256 -0700
+++ 25-akpm/fs/ncpfs/inode.c	2004-06-26 14:45:32.170094768 -0700
@@ -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) {
_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-06-26 22:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-26 22:00 [patch 5/6] ncpfs_setattr() retval fix akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).