From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030714AbWF0HUa (ORCPT ); Tue, 27 Jun 2006 03:20:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030736AbWF0HU3 (ORCPT ); Tue, 27 Jun 2006 03:20:29 -0400 Received: from cantor.suse.de ([195.135.220.2]:18309 "EHLO mx1.suse.de") by vger.kernel.org with ESMTP id S1030732AbWF0HUX (ORCPT ); Tue, 27 Jun 2006 03:20:23 -0400 From: NeilBrown To: Andrew Morton Date: Tue, 27 Jun 2006 17:20:17 +1000 Message-Id: <1060627072017.26685@suse.de> X-face: [Gw_3E*Gng}4rRrKRYotwlE?.2|**#s9D Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org From: David M. Richter 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 Signed-off-by: J. Bruce Fields ### Diffstat output ./fs/nfsd/vfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff .prev/fs/nfsd/vfs.c ./fs/nfsd/vfs.c --- .prev/fs/nfsd/vfs.c 2006-06-27 12:15:21.000000000 +1000 +++ ./fs/nfsd/vfs.c 2006-06-27 14:44:27.000000000 +1000 @@ -1520,14 +1520,15 @@ nfsd_link(struct svc_rqst *rqstp, struct 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; } /*