Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270034
b: refs/heads/master
c: f3c7691
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields authored and root committed Oct 28, 2011
1 parent 5da2d26 commit b135e37
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 79835a710d6ff811659c8de46f89c7577c3b8cc6
refs/heads/master: f3c7691e8d30d88899b514675c7c86d19057b5fd
5 changes: 1 addition & 4 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions trunk/fs/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b135e37

Please sign in to comment.