aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDavid M. Richter <richterd@citi.umich.edu>2006-06-30 04:56:15 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-30 14:25:40 -0400
commit270d56e536dcd37cc819a6adb51d918185411048 (patch)
tree7594eb9368e1977ff68bc8a9c61afa2cc41640c5 /fs
parent6e46d8a9ccbcd3273bdb6902ca2b6da62c253e73 (diff)
[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: David M. Richter <richterd@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/vfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index b653ede37e66..f916b170e136 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -1517,14 +1517,15 @@ nfsd_link(struct svc_rqst *rqstp, struct svc_fh *ffhp,
1517 err = nfserrno(err); 1517 err = nfserrno(err);
1518 } 1518 }
1519 1519
1520 fh_unlock(ffhp);
1521 dput(dnew); 1520 dput(dnew);
1521out_unlock:
1522 fh_unlock(ffhp);
1522out: 1523out:
1523 return err; 1524 return err;
1524 1525
1525out_nfserr: 1526out_nfserr:
1526 err = nfserrno(err); 1527 err = nfserrno(err);
1527 goto out; 1528 goto out_unlock;
1528} 1529}
1529 1530
1530/* 1531/*