diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-30 17:04:15 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-30 17:04:15 +0200 |
commit | b4566ac52484a5eef1d73e310f28235cd1b0685a (patch) | |
tree | b49c6ee4973801b96751fcda97d7df68f4afafaf /fs | |
parent | Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/... (diff) | |
parent | nilfs2: fix bh leak in nilfs_cpfile_delete_checkpoints function (diff) | |
download | linux-b4566ac52484a5eef1d73e310f28235cd1b0685a.tar.xz linux-b4566ac52484a5eef1d73e310f28235cd1b0685a.zip |
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
Diffstat (limited to 'fs')
-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, ret = nilfs_cpfile_get_checkpoint_block(cpfile, cno, 0, &cp_bh); if (ret < 0) { if (ret != -ENOENT) - goto out_sem; + goto out_header; /* skip hole */ ret = 0; continue; @@ -344,7 +344,7 @@ int nilfs_cpfile_delete_checkpoints(struct inode *cpfile, continue; printk(KERN_ERR "%s: cannot delete block\n", __func__); - goto out_sem; + goto out_header; } } @@ -361,6 +361,8 @@ int nilfs_cpfile_delete_checkpoints(struct inode *cpfile, nilfs_mdt_mark_dirty(cpfile); kunmap_atomic(kaddr, KM_USER0); } + + out_header: brelse(header_bh); out_sem: |