Re: [PATCH 0/4] locks: flock and lease related bugfixes, and remove i_flctx counters

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

 



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-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux