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

Commit 270d56e5 authored by David M. Richter's avatar David M. Richter Committed by Linus Torvalds
Browse files

[PATCH] knfsd: nfsd: fix misplaced fh_unlock() in nfsd_link()



In the event that lookup_one_len() fails in nfsd_link(), fh_unlock() is
skipped and locks are held overlong.

Patch was tested on 2.6.17-rc2 by causing lookup_one_len() to fail and
verifying that fh_unlock() gets called appropriately.

Signed-off-by: default avatarDavid M. Richter <richterd@citi.umich.edu>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6e46d8a9
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1517,14 +1517,15 @@ nfsd_link(struct svc_rqst *rqstp, struct svc_fh *ffhp,
			err = nfserrno(err);
	}

	fh_unlock(ffhp);
	dput(dnew);
out_unlock:
	fh_unlock(ffhp);
out:
	return err;

out_nfserr:
	err = nfserrno(err);
	goto out;
	goto out_unlock;
}

/*