Message ID | 20130329184331.GH22307@fieldses.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 03/29/2013 07:43 PM, J. Bruce Fields wrote: > For now, though, this should fix the bug. > > Thanks again for this testing. With this patch applied on top of 3.8.5 the bug could not be reproduced any longer (till now). @Dave Just Cc:'ed you for your trinity score card :-)
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); } }