diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-30 11:04:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-30 11:04:15 -0400 |
commit | b4566ac52484a5eef1d73e310f28235cd1b0685a (patch) | |
tree | b49c6ee4973801b96751fcda97d7df68f4afafaf | |
parent | 3b798a5231be15411225b99dc1217580e8d6ae1f (diff) | |
parent | 62013ab5d5df297a01ae5863b5c26d758ec0af7f (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
nilfs2: fix bh leak in nilfs_cpfile_delete_checkpoints function
-rw-r--r-- | fs/nilfs2/cpfile.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nilfs2/cpfile.c b/fs/nilfs2/cpfile.c index e90b60dfced9..300f1cdfa862 100644 --- a/fs/nilfs2/cpfile.c +++ b/fs/nilfs2/cpfile.c | |||
@@ -311,7 +311,7 @@ int nilfs_cpfile_delete_checkpoints(struct inode *cpfile, | |||
311 | ret = nilfs_cpfile_get_checkpoint_block(cpfile, cno, 0, &cp_bh); | 311 | ret = nilfs_cpfile_get_checkpoint_block(cpfile, cno, 0, &cp_bh); |
312 | if (ret < 0) { | 312 | if (ret < 0) { |
313 | if (ret != -ENOENT) | 313 | if (ret != -ENOENT) |
314 | goto out_sem; | 314 | goto out_header; |
315 | /* skip hole */ | 315 | /* skip hole */ |
316 | ret = 0; | 316 | ret = 0; |
317 | continue; | 317 | continue; |
@@ -344,7 +344,7 @@ int nilfs_cpfile_delete_checkpoints(struct inode *cpfile, | |||
344 | continue; | 344 | continue; |
345 | printk(KERN_ERR "%s: cannot delete block\n", | 345 | printk(KERN_ERR "%s: cannot delete block\n", |
346 | __func__); | 346 | __func__); |
347 | goto out_sem; | 347 | goto out_header; |
348 | } | 348 | } |
349 | } | 349 | } |
350 | 350 | ||
@@ -361,6 +361,8 @@ int nilfs_cpfile_delete_checkpoints(struct inode *cpfile, | |||
361 | nilfs_mdt_mark_dirty(cpfile); | 361 | nilfs_mdt_mark_dirty(cpfile); |
362 | kunmap_atomic(kaddr, KM_USER0); | 362 | kunmap_atomic(kaddr, KM_USER0); |
363 | } | 363 | } |
364 | |||
365 | out_header: | ||
364 | brelse(header_bh); | 366 | brelse(header_bh); |
365 | 367 | ||
366 | out_sem: | 368 | out_sem: |