Skip to content

Commit

Permalink
[PATCH] knfsd: nfsd: fix misplaced fh_unlock() in nfsd_link()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David M. Richter authored and Linus Torvalds committed Jun 30, 2006
1 parent 6e46d8a commit 270d56e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/*
Expand Down

0 comments on commit 270d56e

Please sign in to comment.