Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 158985 Details for
Bug 207670
wrong access rights on NFS mount
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Seconded Proposed Upstream patch.
linux-2.6.22-nfs-conflict-mounts.patch (text/x-patch), 2.66 KB, created by
Steve Dickson
on 2007-07-11 18:13:25 UTC
(
hide
)
Description:
Seconded Proposed Upstream patch.
Filename:
MIME Type:
Creator:
Steve Dickson
Created:
2007-07-11 18:13:25 UTC
Size:
2.66 KB
patch
obsolete
>commit 608a2896d6d9079b97715820ae8a5469e70bdecc >Author: Trond Myklebust <Trond.Myklebust@netapp.com> >Date: Wed May 16 16:53:28 2007 -0400 > > NFS: Error when mounting the same filesystem with different options > > Unless the user sets the NFS_MOUNT_NOSHAREDCACHE mount flag, we should > return EBUSY if the filesystem is already mounted on a superblock that > has set conflicting mount options. > > Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> > >diff --git a/fs/nfs/super.c b/fs/nfs/super.c >index c03120a..f7f8844 100644 >--- a/fs/nfs/super.c >+++ b/fs/nfs/super.c >@@ -601,7 +601,9 @@ static int nfs_compare_super(struct super_block *sb, void *data) > { > struct nfs_server *server = data, *old = NFS_SB(sb); > >- if (old->nfs_client != server->nfs_client) >+ if (memcmp(&old->nfs_client->cl_addr, >+ &server->nfs_client->cl_addr, >+ sizeof(old->nfs_client->cl_addr)) != 0) > return 0; > /* Note: NFS_MOUNT_UNSHARED == NFS4_MOUNT_UNSHARED */ > if (old->flags & NFS_MOUNT_UNSHARED) >@@ -611,6 +613,39 @@ static int nfs_compare_super(struct super_block *sb, void *data) > return 1; > } > >+#define NFS_MS_MASK (MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_SYNCHRONOUS) >+ >+static int nfs_compare_mount_options(const struct super_block *s, const struct nfs_server *b, int flags) >+{ >+ const struct nfs_server *a = s->s_fs_info; >+ const struct rpc_clnt *clnt_a = a->client; >+ const struct rpc_clnt *clnt_b = b->client; >+ >+ if ((s->s_flags & NFS_MS_MASK) != (flags & NFS_MS_MASK)) >+ goto Ebusy; >+ if (a->nfs_client != b->nfs_client) >+ goto Ebusy; >+ if (a->flags != b->flags) >+ goto Ebusy; >+ if (a->wsize != b->wsize) >+ goto Ebusy; >+ if (a->rsize != b->rsize) >+ goto Ebusy; >+ if (a->acregmin != b->acregmin) >+ goto Ebusy; >+ if (a->acregmax != b->acregmax) >+ goto Ebusy; >+ if (a->acdirmin != b->acdirmin) >+ goto Ebusy; >+ if (a->acdirmax != b->acdirmax) >+ goto Ebusy; >+ if (clnt_a->cl_auth->au_flavor != clnt_b->cl_auth->au_flavor) >+ goto Ebusy; >+ return 0; >+Ebusy: >+ return -EBUSY; >+} >+ > static int nfs_get_sb(struct file_system_type *fs_type, > int flags, const char *dev_name, void *raw_data, struct vfsmount *mnt) > { >@@ -645,8 +680,11 @@ static int nfs_get_sb(struct file_system_type *fs_type, > } > > if (s->s_fs_info != server) { >+ error = nfs_compare_mount_options(s, server, flags); > nfs_free_server(server); > server = NULL; >+ if (error < 0) >+ goto error_splat_super; > } > > if (!s->s_root) { >@@ -903,8 +941,11 @@ static int nfs4_get_sb(struct file_system_type *fs_type, > } > > if (s->s_fs_info != server) { >+ error = nfs_compare_mount_options(s, server, flags); > nfs_free_server(server); > server = NULL; >+ if (error < 0) >+ goto error_splat_super; > } > > if (!s->s_root) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 207670
:
158984
| 158985