diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/logfs/dir.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/logfs/dir.c b/fs/logfs/dir.c index 89104e6f81c4..e7659b15a907 100644 --- a/fs/logfs/dir.c +++ b/fs/logfs/dir.c | |||
@@ -224,10 +224,14 @@ static int logfs_unlink(struct inode *dir, struct dentry *dentry) | |||
224 | inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; | 224 | inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; |
225 | 225 | ||
226 | page = logfs_get_dd_page(dir, dentry); | 226 | page = logfs_get_dd_page(dir, dentry); |
227 | if (!page) | 227 | if (!page) { |
228 | kfree(ta); | ||
228 | return -ENOENT; | 229 | return -ENOENT; |
229 | if (IS_ERR(page)) | 230 | } |
231 | if (IS_ERR(page)) { | ||
232 | kfree(ta); | ||
230 | return PTR_ERR(page); | 233 | return PTR_ERR(page); |
234 | } | ||
231 | index = page->index; | 235 | index = page->index; |
232 | page_cache_release(page); | 236 | page_cache_release(page); |
233 | 237 | ||