On Fri, Aug 19, 2011 at 10:40:39AM +0100, Steven Whitehouse wrote: > > - if (!filp->f_path.dentry->d_inode->i_flock) > > + inode = filp->f_path.dentry->d_inode; > > + > > + if (!inode->i_flock) > > return; > > > So if you take the lock at this point, and drop it after the loop, that > should resolve the issue without incurring the extra overhead on every > single close, Yep, thanks. > > + for_each_lock(inode, before) { > > + struct file_lock *fl = *before; > > + if (IS_POSIX(fl)) > > + goto do_unlock; > > + } > > + return; > > + > > +do_unlock: > > lock.fl_type = F_UNLCK; > > lock.fl_flags = FL_POSIX | FL_CLOSE; > > lock.fl_start = 0; > -- 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