VFS: Add support for the FL_ACCESS flag to flock_lock_file()

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

+5
+5
fs/locks.c
··· 739 739 int found = 0; 740 740 741 741 lock_kernel(); 742 + if (request->fl_flags & FL_ACCESS) 743 + goto find_conflict; 742 744 for_each_lock(inode, before) { 743 745 struct file_lock *fl = *before; 744 746 if (IS_POSIX(fl)) ··· 773 771 if (found) 774 772 cond_resched(); 775 773 774 + find_conflict: 776 775 for_each_lock(inode, before) { 777 776 struct file_lock *fl = *before; 778 777 if (IS_POSIX(fl)) ··· 787 784 locks_insert_block(fl, request); 788 785 goto out; 789 786 } 787 + if (request->fl_flags & FL_ACCESS) 788 + goto out; 790 789 locks_copy_lock(new_fl, request); 791 790 locks_insert_lock(&inode->i_flock, new_fl); 792 791 new_fl = NULL;