diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2015-03-15 11:13:32 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2015-03-31 16:46:38 -0400 |
commit | b77a4b2edb29459ad039a1d8f5769bb2192acae1 (patch) | |
tree | 2020c20c0e8357a8059ae105f88d74a5f4fb26f0 /fs/nfsd | |
parent | f9c72d10d6fbf949558cd088389a42213ed7b12d (diff) |
NFSD: Using path_equal() for checking two paths
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/export.c | 3 | ||||
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index c3e3b6e55ae2..2911f519fe64 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c | |||
@@ -691,8 +691,7 @@ static int svc_export_match(struct cache_head *a, struct cache_head *b) | |||
691 | struct svc_export *orig = container_of(a, struct svc_export, h); | 691 | struct svc_export *orig = container_of(a, struct svc_export, h); |
692 | struct svc_export *new = container_of(b, struct svc_export, h); | 692 | struct svc_export *new = container_of(b, struct svc_export, h); |
693 | return orig->ex_client == new->ex_client && | 693 | return orig->ex_client == new->ex_client && |
694 | orig->ex_path.dentry == new->ex_path.dentry && | 694 | path_equal(&orig->ex_path, &new->ex_path); |
695 | orig->ex_path.mnt == new->ex_path.mnt; | ||
696 | } | 695 | } |
697 | 696 | ||
698 | static void svc_export_init(struct cache_head *cnew, struct cache_head *citem) | 697 | static void svc_export_init(struct cache_head *cnew, struct cache_head *citem) |
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 5fb7e78169a6..5c0aa74cba86 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c | |||
@@ -2020,7 +2020,7 @@ static __be32 nfsd4_encode_path(struct xdr_stream *xdr, | |||
2020 | * dentries/path components in an array. | 2020 | * dentries/path components in an array. |
2021 | */ | 2021 | */ |
2022 | for (;;) { | 2022 | for (;;) { |
2023 | if (cur.dentry == root->dentry && cur.mnt == root->mnt) | 2023 | if (path_equal(&cur, root)) |
2024 | break; | 2024 | break; |
2025 | if (cur.dentry == cur.mnt->mnt_root) { | 2025 | if (cur.dentry == cur.mnt->mnt_root) { |
2026 | if (follow_up(&cur)) | 2026 | if (follow_up(&cur)) |