lkml.org 
[lkml]   [2015]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 02/10] locks: have locks_release_file use flock_lock_file to release generic flock locks
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 the other hand, we do take and drop
> the i_lock/flc_lock more than once with this scheme if there are both
> flock locks and leases present at the time of the close. Open coding
> the loops would allow us to do that just once.
>
> I'll ponder it a bit more for the next iteration...

FYI, I like the split into locks_remove_flock, it's just that
flock_lock_file is giant mess. If it helps you feel free to keep
it as-is for now and just document what you did in the changelog in
detail.


\
 
 \ /
  Last update: 2015-01-09 16:01    [W:0.826 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site