Skip to contentSkip to conversation

kNFSd - 1 of 2 - Convert error code to nfserror code in nfsd_symlink

PATCH New NeilBrown 1 participant 1 message Jul 28, 2003

Subsystems (2)
lore
Share & tools
lore

NeilBrown

author
#0 lore raw

PATCH 1/1 kNFSd - 1 of 2 - Convert error code to nfserror code in nfsd_symlink

As Andreas Gruenbacher <[email protected]> noticed, without this as wrong error code can leak out.

(patch against 2.4.22-pre9)

fs/nfsd/vfs.c renamed from fs/nfsd/vfs.c~current~ +3 -1
diff ./fs/nfsd/vfs.c~current~ ./fs/nfsd/vfs.c
@@ -1151,7 +1151,9 @@ nfsd_symlink(struct svc_rqst *rqstp, str
 				iap->ia_mode = (iap->ia_mode&S_IALLUGO)
 					| S_IFLNK;
 				err = notify_change(dnew, iap);
-				if (!err && EX_ISSYNC(fhp->fh_export))
+				if (err)
+					err = nfserrno(err);
+				else if (EX_ISSYNC(fhp->fh_export))
 					write_inode_now(dentry->d_inode, 1);
 		       }
 		}

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs