linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nfsd_symlink() failpath fix
@ 2003-03-17 10:57 Andreas Gruenbacher
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Gruenbacher @ 2003-03-17 10:57 UTC (permalink / raw)
  To: Marcelo Tossati, Andrew Morton; +Cc: linux-fsdevel

[-- Attachment #1: Type: text/plain, Size: 687 bytes --]

Hello,

In both 2.5 and 2.4, the fs/nfsd/vfs.c:nfsd_symlink() function calls down to 
notify_change(). If notify_change fails for some reason, the error code is 
not converted to an nfs no-the-wire error code as is should. The attached 
patches fix that (one for 2.4, the other for 2.5).

Marcelo, could you please apply the patch?
Andrew, could you please batch that up in your next update for Linus?


Thanks,
Andreas.

------------------------------------------------------------------
 Andreas Gruenbacher                                SuSE Linux AG
 mailto:agruen@suse.de                     Deutschherrnstr. 15-19
 http://www.suse.de/                   D-90429 Nuernberg, Germany

[-- Attachment #2: nfsd-symlink-failpath-2.5.64.diff --]
[-- Type: text/x-diff, Size: 446 bytes --]

--- linux-2.5.64.orig/fs/nfsd/vfs.c	2003-03-17 11:36:39.000000000 +0100
+++ linux-2.5.64/fs/nfsd/vfs.c	2003-03-17 11:37:32.000000000 +0100
@@ -1190,7 +1190,9 @@
 				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);
 		       }
 		}

[-- Attachment #3: nfsd-symlink-failpath-2.4.21-pre5.diff --]
[-- Type: text/x-diff, Size: 456 bytes --]

--- linux-2.4.21-pre5.orig/fs/nfsd/vfs.c	2003-03-17 11:49:27.000000000 +0100
+++ linux-2.4.21-pre5/fs/nfsd/vfs.c	2003-03-17 11:50:01.000000000 +0100
@@ -1151,7 +1151,9 @@
 				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);
 		       }
 		}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] nfsd_symlink() failpath fix
@ 2003-03-17 11:00 Andreas Gruenbacher
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Gruenbacher @ 2003-03-17 11:00 UTC (permalink / raw)
  To: Marcelo Tossati, Andrew Morton; +Cc: linux-fsdevel

[-- Attachment #1: Type: text/plain, Size: 686 bytes --]

Hello,

In both 2.5 and 2.4, the fs/nfsd/vfs.c:nfsd_symlink() function calls down to 
notify_change(). If notify_change fails for some reason, the error code is 
not converted to an nfs no-the-wire error code as is should. The attached 
patches fix that (one for 2.4, the other for 2.5).

Marcelo, could you please apply the patch?
Andrew, could you please batch that up in your next update for Linus?


Thanks,
Andreas.

------------------------------------------------------------------
 Andreas Gruenbacher                                SuSE Linux AG
 mailto:agruen@suse.de                     Deutschherrnstr. 15-19
 http://www.suse.de/                   D-90429 Nuernberg, Germany

[-- Attachment #2: nfsd-symlink-failpath-2.5.64.diff --]
[-- Type: text/x-diff, Size: 446 bytes --]

--- linux-2.5.64.orig/fs/nfsd/vfs.c	2003-03-17 11:36:39.000000000 +0100
+++ linux-2.5.64/fs/nfsd/vfs.c	2003-03-17 11:37:32.000000000 +0100
@@ -1190,7 +1190,9 @@
 				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);
 		       }
 		}

[-- Attachment #3: nfsd-symlink-failpath-2.4.21-pre5.diff --]
[-- Type: text/x-diff, Size: 456 bytes --]

--- linux-2.4.21-pre5.orig/fs/nfsd/vfs.c	2003-03-17 11:49:27.000000000 +0100
+++ linux-2.4.21-pre5/fs/nfsd/vfs.c	2003-03-17 11:50:01.000000000 +0100
@@ -1151,7 +1151,9 @@
 				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);
 		       }
 		}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-03-17 11:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-17 11:00 [PATCH] nfsd_symlink() failpath fix Andreas Gruenbacher
  -- strict thread matches above, loose matches on Subject: below --
2003-03-17 10:57 Andreas Gruenbacher

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).