[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-nfs
Subject:    [NFS] [PATCH kNFSd ] nlm: fix f_count leak
From:       NeilBrown <neilb () cse ! unsw ! edu ! au>
Date:       2005-03-23 3:18:39
Message-ID: E1DDwOF-0003IA-Gw () notabene ! cse ! unsw ! edu ! au
[Download RAW message or body]

Hi,
 The following patch is probably appropriate for 2.4.30.  The problem
it fixes is not a major one (no security or data corruption issues)
but is an occasional annoyance, and the fix is trivial (and tested).

NeilBrown


### Comments for Changeset

I can't see any reason for this file->f_count++.  Removing it fixes a
bug which leaves an exported filesystem busy (and so unmountable) if a
callback for a lock held on that filesystem ever failed.

Found by Terence Rokop.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>

### Diffstat output
 ./fs/lockd/svclock.c |    1 -
 1 files changed, 1 deletion(-)

diff ./fs/lockd/svclock.c~current~ ./fs/lockd/svclock.c
--- ./fs/lockd/svclock.c~current~	2005-03-23 11:28:56.000000000 +1100
+++ ./fs/lockd/svclock.c	2005-03-23 11:29:02.000000000 +1100
@@ -640,7 +640,6 @@ nlmsvc_grant_reply(struct svc_rqst *rqst
 		} else {
 			/* Lock is now held by client, or has been rejected.
 			 * In both cases, the block should be removed. */
-			file->f_count++;
 			up(&file->f_sema);
 			if (status == NLM_LCK_GRANTED)
 				nlmsvc_delete_block(block, 0);


-------------------------------------------------------
This SF.net email is sponsored by: 2005 Windows Mobile Application Contest
Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones
for the chance to win $25,000 and application distribution. Enter today at
http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic