diff --git a/[refs] b/[refs] index 3440ddd33175..f063ebdb7531 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 79835a710d6ff811659c8de46f89c7577c3b8cc6 +refs/heads/master: f3c7691e8d30d88899b514675c7c86d19057b5fd diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 9061157e39d6..7657be4352bf 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -2035,10 +2035,7 @@ static int may_open(struct path *path, int acc_mode, int flag) if (flag & O_NOATIME && !inode_owner_or_capable(inode)) return -EPERM; - /* - * Ensure there are no outstanding leases on the file. - */ - return break_lease(inode, flag); + return 0; } static int handle_truncate(struct file *filp) diff --git a/trunk/fs/open.c b/trunk/fs/open.c index f71192109457..22c41b543f2d 100644 --- a/trunk/fs/open.c +++ b/trunk/fs/open.c @@ -685,6 +685,10 @@ static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt, if (error) goto cleanup_all; + error = break_lease(inode, f->f_flags); + if (error) + goto cleanup_all; + if (!open && f->f_op) open = f->f_op->open; if (open) {