From: "J. Bruce Fields" <bfields@fieldses.org>
To: "Toralf Förster" <toralf.foerster@gmx.de>
Cc: Linux NFS mailing list <linux-nfs@vger.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: kernel 3.8.4 : kernel BUG at fs/locks.c:2093! part #2
Date: Fri, 29 Mar 2013 14:43:31 -0400 [thread overview]
Message-ID: <20130329184331.GH22307@fieldses.org> (raw)
In-Reply-To: <20130327215727.GB27426@fieldses.org>
On Wed, Mar 27, 2013 at 05:57:27PM -0400, J. Bruce Fields wrote:
> On Wed, Mar 27, 2013 at 10:35:12PM +0100, Toralf Förster wrote:
> > On 03/26/2013 03:46 PM, J. Bruce Fields wrote:
> > > Can you run with test patches?
> >
> > applied - today I got a warning instead a bug at the host kernel (3.8.4):
>
> Excellent! Thanks, I think I see the bug now....
This logic is just terrible; I'll see what if I can make this more
sensible.
For now, though, this should fix the bug.
Thanks again for this testing.
--b.
commit 01463db0a864d43bd2c9a69ff37d5a75b7822a49
Author: J. Bruce Fields <bfields@redhat.com>
Date: Thu Mar 28 20:37:14 2013 -0400
nfsd4: don't close read-write opens too soon
Don't actually close any opens until we don't need them at all.
This means being left with write access when it's not really necessary,
but that's better than putting a file that might still have posix locks
held on it, as we have been.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index aac878e..285a0c8 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -210,13 +210,7 @@ static void __nfs4_file_put_access(struct nfs4_file *fp, int oflag)
{
if (atomic_dec_and_test(&fp->fi_access[oflag])) {
nfs4_file_put_fd(fp, oflag);
- /*
- * It's also safe to get rid of the RDWR open *if*
- * we no longer have need of the other kind of access
- * or if we already have the other kind of open:
- */
- if (fp->fi_fds[1-oflag]
- || atomic_read(&fp->fi_access[1 - oflag]) == 0)
+ if (atomic_read(&fp->fi_access[1 - oflag]) == 0)
nfs4_file_put_fd(fp, O_RDWR);
}
}
next prev parent reply other threads:[~2013-03-29 18:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-24 17:02 kernel 3.8.4 : kernel BUG at fs/locks.c:2093! part #2 Toralf Förster
2013-03-25 22:01 ` J. Bruce Fields
2013-03-26 14:46 ` J. Bruce Fields
2013-03-26 17:37 ` Al Viro
2013-03-26 17:46 ` Toralf Förster
2013-03-26 18:17 ` J. Bruce Fields
2013-03-27 17:20 ` Toralf Förster
2013-03-27 17:46 ` J. Bruce Fields
2013-03-27 21:35 ` Toralf Förster
2013-03-27 21:57 ` J. Bruce Fields
2013-03-29 18:43 ` J. Bruce Fields [this message]
2013-04-01 20:26 ` Toralf Förster
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=20130329184331.GH22307@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=toralf.foerster@gmx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).