From: Andreas Gruenbacher <agruen@suse.de>
To: Marcelo Tossati <marcelo@conectiva.com.br>,
Andrew Morton <akmp@zip.com.au>
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH] nfsd_symlink() failpath fix
Date: Mon, 17 Mar 2003 11:57:50 +0100 [thread overview]
Message-ID: <200303171157.50489.agruen@suse.de> (raw)
[-- 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);
}
}
next reply other threads:[~2003-03-17 10:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-17 10:57 Andreas Gruenbacher [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-03-17 11:00 [PATCH] nfsd_symlink() failpath fix Andreas Gruenbacher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200303171157.50489.agruen@suse.de \
--to=agruen@suse.de \
--cc=akmp@zip.com.au \
--cc=linux-fsdevel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).