diff options
Diffstat (limited to 'fs/open.c')
| -rw-r--r-- | fs/open.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -786,11 +786,11 @@ struct file *nameidata_to_filp(struct nameidata *nd) | |||
| 786 | /* Pick up the filp from the open intent */ | 786 | /* Pick up the filp from the open intent */ |
| 787 | filp = nd->intent.open.file; | 787 | filp = nd->intent.open.file; |
| 788 | /* Has the filesystem initialised the file for us? */ | 788 | /* Has the filesystem initialised the file for us? */ |
| 789 | if (filp->f_path.dentry == NULL) | 789 | if (filp->f_path.dentry == NULL) { |
| 790 | path_get(&nd->path); | ||
| 790 | filp = __dentry_open(nd->path.dentry, nd->path.mnt, filp, | 791 | filp = __dentry_open(nd->path.dentry, nd->path.mnt, filp, |
| 791 | NULL, cred); | 792 | NULL, cred); |
| 792 | else | 793 | } |
| 793 | path_put(&nd->path); | ||
| 794 | return filp; | 794 | return filp; |
| 795 | } | 795 | } |
| 796 | 796 | ||
