J. Bruce Fields
129a84de23
locks: fix F_GETLK regression (failure to find conflicts)
...
In 9d6a8c5c213e34c475e72b245a8eb709258e968c we changed posix_test_lock
to modify its single file_lock argument instead of taking separate input
and output arguments. This makes it no longer safe to set the output
lock's fl_type to F_UNLCK before looking for a conflict, since that
means searching for a conflict against a lock with type F_UNLCK.
This fixes a regression which causes F_GETLK to incorrectly report no
conflict on most filesystems (including any filesystem that doesn't do
its own locking).
Also fix posix_lock_to_flock() to copy the lock type. This isn't
strictly necessary, since the caller already does this; but it seems
less likely to cause confusion in the future.
Thanks to Doug Chapman for the bug report.
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Acked-by: Doug Chapman <doug.chapman@hp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-10 20:25:59 -07:00
..
2007-05-08 11:15:07 -07:00
2007-05-07 12:12:57 -07:00
2007-05-09 12:30:55 -07:00
2007-05-10 09:26:52 -07:00
2007-05-08 11:15:07 -07:00
2007-05-07 12:12:57 -07:00
2007-05-07 12:12:57 -07:00
2007-05-08 11:15:07 -07:00
2007-05-07 12:12:57 -07:00
2007-05-09 12:30:49 -07:00
2007-05-07 12:12:51 -07:00
2007-05-02 18:57:59 -07:00
2007-05-08 11:14:59 -07:00
2007-05-07 12:26:27 -07:00
2007-05-08 11:15:07 -07:00
2007-05-07 12:12:57 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:13 -07:00
2007-05-09 12:30:55 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:14 -07:00
2007-05-08 11:14:59 -07:00
2007-05-08 11:15:01 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:14:59 -07:00
2007-05-08 11:14:59 -07:00
2007-05-08 11:14:57 -07:00
2007-05-07 12:12:57 -07:00
2007-05-07 12:12:57 -07:00
2007-05-07 12:12:57 -07:00
2007-05-09 08:58:16 +02:00
2007-05-09 08:58:16 +02:00
2007-05-09 13:10:11 -07:00
2007-05-09 08:57:56 +02:00
2007-05-08 11:15:07 -07:00
2007-05-07 12:12:57 -07:00
2007-05-08 11:15:07 -07:00
2007-05-09 17:58:01 -04:00
2007-05-09 12:30:54 -07:00
2007-05-08 11:15:07 -07:00
2007-05-10 09:26:52 -07:00
2007-05-07 12:12:57 -07:00
2007-05-08 11:15:09 -07:00
2007-05-08 20:41:14 -07:00
2007-05-07 12:12:57 -07:00
2007-05-08 11:15:07 -07:00
2007-05-09 12:54:17 -07:00
2007-05-07 12:12:57 -07:00
2007-05-08 11:15:11 -07:00
2007-05-09 12:30:49 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:22 -07:00
2007-05-08 11:15:07 -07:00
2007-05-09 12:54:17 -07:00
2007-05-09 12:30:53 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:15 -07:00
2007-05-08 11:15:07 -07:00
2007-05-09 12:30:49 -07:00
2007-05-08 11:15:07 -07:00
2007-05-07 12:12:55 -07:00
2007-05-08 11:14:59 -07:00
2007-05-09 12:30:56 -07:00
2007-05-10 13:34:05 -07:00
2007-05-08 11:15:18 -07:00
2007-05-08 11:15:07 -07:00
2007-05-09 12:54:17 -07:00
2007-05-08 11:15:11 -07:00
2007-05-08 11:15:11 -07:00
2007-05-08 11:15:08 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:01 -07:00
2007-05-08 11:15:16 -07:00
2007-05-08 11:15:11 -07:00
2007-05-08 11:15:09 -07:00
2007-05-08 11:15:02 -07:00
2007-05-09 08:58:15 +02:00
2007-05-07 12:12:58 -07:00
2007-05-09 06:44:57 +02:00
2007-05-10 20:25:59 -07:00
2007-05-09 12:30:55 -07:00
2007-05-09 12:30:50 -07:00
2007-05-08 11:15:12 -07:00
2007-05-08 20:10:00 -07:00
2007-05-08 11:15:03 -07:00
2007-05-08 11:15:11 -07:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:14:59 -07:00
2007-05-08 11:15:09 -07:00
2007-05-09 07:10:02 +02:00
2007-05-08 08:46:19 +02:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:01 -07:00
2007-05-08 11:15:04 -07:00
2007-05-08 11:15:18 -07:00
2007-05-08 11:15:07 -07:00