diff options
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r-- | fs/gfs2/inode.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index ce0cf9ad5f97..6e2917433170 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -1249,11 +1249,8 @@ static int gfs2_atomic_open(struct inode *dir, struct dentry *dentry, if (d != NULL) dentry = d; if (dentry->d_inode) { - if (!(*opened & FILE_OPENED)) { - if (d == NULL) - dget(dentry); - return finish_no_open(file, dentry); - } + if (!(*opened & FILE_OPENED)) + return finish_no_open(file, d); dput(d); return 0; } |