Re: [PATCH v2 02/10] locks: have locks_release_file use flock_lock_file to release generic flock locks

2015-01-09 Thread Christoph Hellwig
On Thu, Jan 08, 2015 at 10:34:17AM -0800, Jeff Layton wrote: ...instead of open-coding it and removing flock locks directly. This simplifies some coming interim changes in the following patches when we have different file_lock types protected by different spinlocks. It took me quite a while to

Re: [PATCH v2 02/10] locks: have locks_release_file use flock_lock_file to release generic flock locks

2015-01-09 Thread Jeff Layton
On Fri, 9 Jan 2015 06:27:23 -0800 Christoph Hellwig h...@infradead.org wrote: On Thu, Jan 08, 2015 at 10:34:17AM -0800, Jeff Layton wrote: ...instead of open-coding it and removing flock locks directly. This simplifies some coming interim changes in the following patches when we have

Re: [PATCH v2 02/10] locks: have locks_release_file use flock_lock_file to release generic flock locks

2015-01-09 Thread Christoph Hellwig
On Fri, Jan 09, 2015 at 06:42:57AM -0800, Jeff Layton wrote: I'd suggest keeping an open coded loop in locks_remove_flock, which should both be more efficient and easier to review. I don't know. On the one hand, I rather like keeping all of the lock removal logic in a single spot. On

[PATCH v2 02/10] locks: have locks_release_file use flock_lock_file to release generic flock locks

2015-01-08 Thread Jeff Layton
...instead of open-coding it and removing flock locks directly. This simplifies some coming interim changes in the following patches when we have different file_lock types protected by different spinlocks. Signed-off-by: Jeff Layton jlay...@primarydata.com --- fs/locks.c | 49