Skip to contentSkip to conversation

nlm: fix f_count leak

PATCH Applied NeilBrown 2 participants 2 messages Mar 23, 2005 – Mar 26, 2005 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20050323141612.12609.patches@notabene

NeilBrown

author
#1 lore raw

PATCH 1/1 nlm: fix f_count leak

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.

### Diffstat output

 ./fs/lockd/svclock.c |    1 -
 1 files changed, 1 deletion(-)
fs/lockd/svclock.c renamed from fs/lockd/svclock.c~current~ +0 -1
diff ./fs/lockd/svclock.c~current~ ./fs/lockd/svclock.c
@@ -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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#2 lore raw
Quoted 4 lines · NeilBrown

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).

Applied, thanks Neil.

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs