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-02-12 09:48:47 -08: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-02-12 09:48:47 -08: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-02-12 09:48:46 -08:00
2007-05-08 11:15:07 -07:00
2007-05-09 17:58:01 -04:00
2006-10-20 10:26:41 -07:00
2007-05-09 12:30:54 -07:00
2006-12-07 08:39:46 -08: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-02-12 09:48:46 -08: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
2006-12-08 08:28:41 -08: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-02-09 10:45:33 -08:00
2007-05-09 12:30:49 -07:00
2007-05-08 11:15:07 -07:00
2006-10-04 06:51:26 -06: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-04-04 21:12:47 -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
2006-12-07 08:39:25 -08:00
2007-05-09 12:54:17 -07:00
2006-12-08 08:28:41 -08:00
2007-05-08 11:15:11 -07:00
2007-02-11 10:51:31 -08:00
2007-05-08 11:15:11 -07:00
2007-05-08 11:15:08 -07:00
2006-12-10 09:57:22 -08:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:15:07 -07:00
2006-12-22 08:55:50 -08:00
2007-05-08 11:15:01 -07:00
2007-01-26 12:53:20 -08:00
2006-09-29 09:18:24 -07:00
2007-05-08 11:15:16 -07:00
2007-02-12 09:48:28 -08: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-02-12 09:48:32 -08: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-02-17 16:10:59 -05:00
2006-12-07 08:39:25 -08: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
2006-06-30 19:25:36 +02:00
2006-09-30 20:52:31 +02: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
2006-12-08 08:28:51 -08:00
2006-10-01 00:39:19 -07:00
2005-04-16 15:20:36 -07:00
2006-03-23 07:38:11 -08:00
2007-05-08 11:15:07 -07:00
2007-05-08 11:14:59 -07:00
2006-10-01 00:39:28 -07:00
2007-05-08 11:15:09 -07:00
2007-05-09 07:10:02 +02:00
2006-12-08 08:28:41 -08:00
2007-05-08 08:46:19 +02:00
2007-02-19 14:21:50 -08: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-02-14 08:09:54 -08:00
2007-05-08 11:15:07 -07:00