[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFwdAg_St3_qJPSHfityE7772taoPKwSg1M3B0WiBWnCsA@mail.gmail.com>
Date: Tue, 17 Feb 2015 11:55:01 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Jeff Layton <jeff.layton@...marydata.com>
Cc: linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"Kirill A. Shutemov" <kirill@...temov.name>,
"J. Bruce Fields" <bfields@...ldses.org>,
Christoph Hellwig <hch@....de>,
Dave Chinner <david@...morbit.com>,
Sasha Levin <sasha.levin@...cle.com>
Subject: Re: [PATCH 0/4] locks: flock and lease related bugfixes, and remove
i_flctx counters
Ok, so having gone over these, I think 1, 2 and 4 are fine.
Let's just drop 3. The upgrade clearly does need to drop the old lock
when returning FILE_LOCK_DEFERRED, because otherwise two upgraders
will deadlock waiting for each other.
Oh, and in #1, you might want to remove the "FIXME: add counters to
struct file_lock_context so we don't need to do this?" although that
obviously makes it not strictly a 100% revert. I do believe that we
should add a "list_count()" function, so that we could write
*flock_count = list_count(&ctx->flc_flock);
instead of that horribly ugly
list_for_each_entry(lock, &ctx->flc_flock, fl_list)
++(*flock_count);
thing. But that's a separate cleanup.
Can we get that truncated series tested with some flock test suite? I
assume there is *some* filesystem tester that tests some basic flock
stuff, even if it clearly didn't catch the race due to the unlock in
the middle..
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists