From: Olaf Kirch <okir@suse.de>
To: Peter Staubach <staubach@redhat.com>
Cc: nfs@lists.sourceforge.net, akpm@osdl.org
Subject: Re: [PATCH fs/locks 3 of 3] Fix race conditions with file lock vs close
Date: Mon, 11 Jul 2005 14:54:19 +0200 [thread overview]
Message-ID: <20050711125419.GS27163@suse.de> (raw)
In-Reply-To: <42D266C5.4010203@redhat.com>
On Mon, Jul 11, 2005 at 08:32:05AM -0400, Peter Staubach wrote:
> A different patch was submitted upstream already to address the fcntl/close
> race. It was accepted into the '-mm' kernel on June 28'th. That patch is
> attached.
I see, it seems this customer has been spamming just about everyone
about this problem :)
I just wonder how the following can work - your patch seems to drop
local book-keeping of locks completely, unless I misread it:
> + if (filp->f_op && filp->f_op->lock != NULL)
> error = filp->f_op->lock(filp, cmd, file_lock);
> + else {
> + for (;;) {
> + error = __posix_lock_file(inode, file_lock);
> + if ((error != -EAGAIN) || (cmd == F_SETLK))
> + break;
> + error = wait_event_interruptible(file_lock->fl_wait,
> + !file_lock->fl_next);
> + if (!error)
> + continue;
> +
> + locks_delete_block(file_lock);
> break;
> + }
> + }
This means if the application establishes an NFS lock, this will not
be reflected locally - and as a consequence, when the application just
exits, the lock will never be released.
Olaf
--
Olaf Kirch | --- o --- Nous sommes du soleil we love when we play
okir@suse.de | / | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next prev parent reply other threads:[~2005-07-11 12:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-11 10:32 [PATCH fs/locks 3 of 3] Fix race conditions with file lock vs close Olaf Kirch
2005-07-11 12:32 ` Peter Staubach
2005-07-11 12:54 ` Olaf Kirch [this message]
2005-07-11 13:04 ` Peter Staubach
2005-07-11 13:20 ` Olaf Kirch
2005-07-11 13:18 ` Trond Myklebust
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050711125419.GS27163@suse.de \
--to=okir@suse.de \
--cc=akpm@osdl.org \
--cc=nfs@lists.sourceforge.net \
--cc=staubach@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.