diff options
-rw-r--r-- | fs/logfs/dir.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/logfs/dir.c b/fs/logfs/dir.c index 72d1893ddd36..675cc49197fe 100644 --- a/fs/logfs/dir.c +++ b/fs/logfs/dir.c | |||
@@ -434,8 +434,11 @@ static int __logfs_create(struct inode *dir, struct dentry *dentry, | |||
434 | int ret; | 434 | int ret; |
435 | 435 | ||
436 | ta = kzalloc(sizeof(*ta), GFP_KERNEL); | 436 | ta = kzalloc(sizeof(*ta), GFP_KERNEL); |
437 | if (!ta) | 437 | if (!ta) { |
438 | inode->i_nlink--; | ||
439 | iput(inode); | ||
438 | return -ENOMEM; | 440 | return -ENOMEM; |
441 | } | ||
439 | 442 | ||
440 | ta->state = CREATE_1; | 443 | ta->state = CREATE_1; |
441 | ta->ino = inode->i_ino; | 444 | ta->ino = inode->i_ino; |