+ knfsd-ignore-ref_fh-when-crossing-a-mountpoint.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     knfsd: ignore ref_fh when crossing a mountpoint

has been added to the -mm tree.  Its filename is

     knfsd-ignore-ref_fh-when-crossing-a-mountpoint.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: knfsd: ignore ref_fh when crossing a mountpoint
From: NeilBrown <neilb@xxxxxxx>

nfsd tries to return to a client the same sort of filehandle as was used by
the client.  This removes some filehandle aliasing issues and means that a
server upgrade followed by a downgrade will not confused clients not restarted
during that time.

However when crossing a mountpoint, the filehandle used for one filesystem
doesn't provide any useful information on what sort of filehandle should be
used on the other, and can provide misleading information.  So if the
reference filehandle is on a different filesystem to the one being generated,
ignore it.

Signed-off-by: Neil Brown <neilb@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/nfsd/nfsfh.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff -puN fs/nfsd/nfsfh.c~knfsd-ignore-ref_fh-when-crossing-a-mountpoint fs/nfsd/nfsfh.c
--- a/fs/nfsd/nfsfh.c~knfsd-ignore-ref_fh-when-crossing-a-mountpoint
+++ a/fs/nfsd/nfsfh.c
@@ -312,8 +312,8 @@ int
 fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, struct svc_fh *ref_fh)
 {
 	/* ref_fh is a reference file handle.
-	 * if it is non-null, then we should compose a filehandle which is
-	 * of the same version, where possible.
+	 * if it is non-null and for the same filesystem, then we should compose
+	 * a filehandle which is of the same version, where possible.
 	 * Currently, that means that if ref_fh->fh_handle.fh_version == 0xca
 	 * Then create a 32byte filehandle using nfs_fhbase_old
 	 *
@@ -332,7 +332,7 @@ fh_compose(struct svc_fh *fhp, struct sv
 		parent->d_name.name, dentry->d_name.name,
 		(inode ? inode->i_ino : 0));
 
-	if (ref_fh) {
+	if (ref_fh && ref_fh->fh_export == exp) {
 		ref_fh_version = ref_fh->fh_handle.fh_version;
 		if (ref_fh_version == 0xca)
 			ref_fh_fsid_type = 0;
_

Patches currently in -mm which might be from neilb@xxxxxxx are

origin.patch
generic_file_buffered_write-deadlock-on-vectored-write.patch
knfsd-improve-the-test-for-cross-device-rename-in-nfsd.patch
knfsd-fixing-missing-expkey-support-for-fsid-type-3.patch
knfsd-remove-noise-about-filehandle-being-uptodate.patch
knfsd-ignore-ref_fh-when-crossing-a-mountpoint.patch
knfsd-nfsd4-fix-open_confirm-locking.patch
knfsd-nfsd-call-nfsd_setuser-on-fh_compose-fix-nfsd4-permissions-problem.patch
knfsd-nfsd4-remove-superfluous-grace-period-checks.patch
knfsd-nfsd-fix-misplaced-fh_unlock-in-nfsd_link.patch
knfsd-svcrpc-gss-simplify-rsc_parse.patch
knfsd-nfsd4-fix-some-open-argument-tests.patch
knfsd-nfsd4-fix-open-flag-passing.patch
knfsd-svcrpc-simplify-nfsd-rpcsec_gss-integrity-code.patch
knfsd-nfsd-mark-rqstp-to-prevent-use-of-sendfile-in-privacy-case.patch
knfsd-svcrpc-gss-server-side-implementation-of-rpcsec_gss-privacy.patch
md-possible-fix-for-unplug-problem.patch
md-set-desc_nr-correctly-for-version-1-superblocks.patch
md-delay-starting-md-threads-until-array-is-completely-setup.patch
md-fix-resync-speed-calculation-for-restarted-resyncs.patch
md-fix-a-plug-unplug-race-in-raid5.patch
md-fix-some-small-races-in-bitmap-plugging-in-raid5.patch
md-fix-usage-of-wrong-variable-in-raid1.patch
md-unify-usage-of-symbolic-names-for-perms.patch
md-require-cap_sys_admin-for-re-configuring-md-devices-via-sysfs.patch
md-fix-will-configure-message-when-interpreting-md=-kernel-parameter.patch
md-include-sector-number-in-messages-about-corrected-read-errors.patch
md-dm-reduce-stack-usage-with-stacked-block-devices.patch
lockdep-annotate-sunrpc-code.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux