Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b77a4b2e authored by Kinglong Mee's avatar Kinglong Mee Committed by J. Bruce Fields
Browse files

NFSD: Using path_equal() for checking two paths

parent f9c72d10
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -691,8 +691,7 @@ static int svc_export_match(struct cache_head *a, struct cache_head *b)
	struct svc_export *orig = container_of(a, struct svc_export, h);
	struct svc_export *orig = container_of(a, struct svc_export, h);
	struct svc_export *new = container_of(b, struct svc_export, h);
	struct svc_export *new = container_of(b, struct svc_export, h);
	return orig->ex_client == new->ex_client &&
	return orig->ex_client == new->ex_client &&
		orig->ex_path.dentry == new->ex_path.dentry &&
		path_equal(&orig->ex_path, &new->ex_path);
		orig->ex_path.mnt == new->ex_path.mnt;
}
}


static void svc_export_init(struct cache_head *cnew, struct cache_head *citem)
static void svc_export_init(struct cache_head *cnew, struct cache_head *citem)
+1 −1
Original line number Original line Diff line number Diff line
@@ -2020,7 +2020,7 @@ static __be32 nfsd4_encode_path(struct xdr_stream *xdr,
	 * dentries/path components in an array.
	 * dentries/path components in an array.
	 */
	 */
	for (;;) {
	for (;;) {
		if (cur.dentry == root->dentry && cur.mnt == root->mnt)
		if (path_equal(&cur, root))
			break;
			break;
		if (cur.dentry == cur.mnt->mnt_root) {
		if (cur.dentry == cur.mnt->mnt_root) {
			if (follow_up(&cur))
			if (follow_up(&cur))