Linux NFS development
 help / color / mirror / Atom feed
* [PATCH kNFSd ] nlm: fix f_count leak
       [not found] <20050323141612.12609.patches@notabene>
@ 2005-03-23  3:18 ` NeilBrown
  2005-03-24 10:30   ` Marcelo Tosatti
  0 siblings, 1 reply; 2+ messages in thread
From: NeilBrown @ 2005-03-23  3:18 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: nfs

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH kNFSd ] nlm: fix f_count leak
  2005-03-23  3:18 ` [PATCH kNFSd ] nlm: fix f_count leak NeilBrown
@ 2005-03-24 10:30   ` Marcelo Tosatti
  0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2005-03-24 10:30 UTC (permalink / raw)
  To: NeilBrown; +Cc: nfs

On Wed, Mar 23, 2005 at 02:18:39PM +1100, NeilBrown wrote:
> 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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-26  0:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20050323141612.12609.patches@notabene>
2005-03-23  3:18 ` [PATCH kNFSd ] nlm: fix f_count leak NeilBrown
2005-03-24 10:30   ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox