Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310066
b: refs/heads/master
c: 91daee9
h: refs/heads/master
v: v3
  • Loading branch information
Miklos Szeredi authored and Al Viro committed Jun 1, 2012
1 parent 9879b84 commit 74b5614
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 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: 78f71eff3c274f3907f4aa1bbe3267281ba1c603
refs/heads/master: 91daee988db38b0207eec719a3160b163c077007
20 changes: 18 additions & 2 deletions trunk/fs/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,9 +828,25 @@ struct file *nameidata_to_filp(struct nameidata *nd)

/* Has the filesystem initialised the file for us? */
if (filp->f_path.dentry == NULL) {
struct file *res;

path_get(&nd->path);
filp = __dentry_open(nd->path.dentry, nd->path.mnt, filp,
NULL, cred);
res = do_dentry_open(nd->path.dentry, nd->path.mnt,
filp, NULL, cred);
if (!IS_ERR(res)) {
int error;

BUG_ON(res != filp);

error = open_check_o_direct(filp);
if (error) {
fput(filp);
filp = ERR_PTR(error);
}
} else {
put_filp(filp);
filp = res;
}
}
return filp;
}
Expand Down

0 comments on commit 74b5614

Please sign in to comment.