Re: kernel 3.8.4 : kernel BUG at fs/locks.c:2093! part #2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
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@xxxxxxxxxx>

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);
 	}
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux