diff options
-rw-r--r-- | fs/libfs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/libfs.c b/fs/libfs.c index c18e9a1235b6..a2c0029cd95f 100644 --- a/fs/libfs.c +++ b/fs/libfs.c | |||
@@ -510,8 +510,10 @@ int simple_fill_super(struct super_block *s, unsigned long magic, | |||
510 | if (!dentry) | 510 | if (!dentry) |
511 | goto out; | 511 | goto out; |
512 | inode = new_inode(s); | 512 | inode = new_inode(s); |
513 | if (!inode) | 513 | if (!inode) { |
514 | dput(dentry); | ||
514 | goto out; | 515 | goto out; |
516 | } | ||
515 | inode->i_mode = S_IFREG | files->mode; | 517 | inode->i_mode = S_IFREG | files->mode; |
516 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; | 518 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
517 | inode->i_fop = files->ops; | 519 | inode->i_fop = files->ops; |