|
@@ -693,6 +693,7 @@ do_getlk(struct file *filp, int cmd, struct file_lock *fl, int is_local)
|
|
|
{
|
|
|
struct inode *inode = filp->f_mapping->host;
|
|
|
int status = 0;
|
|
|
+ unsigned int saved_type = fl->fl_type;
|
|
|
|
|
|
/* Try local locking first */
|
|
|
posix_test_lock(filp, fl);
|
|
@@ -700,6 +701,7 @@ do_getlk(struct file *filp, int cmd, struct file_lock *fl, int is_local)
|
|
|
/* found a conflict */
|
|
|
goto out;
|
|
|
}
|
|
|
+ fl->fl_type = saved_type;
|
|
|
|
|
|
if (nfs_have_delegation(inode, FMODE_READ))
|
|
|
goto out_noconflict;
|