Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206362
b: refs/heads/master
c: f8e6cc0
h: refs/heads/master
v: v3
  • Loading branch information
Ryusuke Konishi committed Jul 23, 2010
1 parent 25ee3c7 commit 7d750d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7c397a81fe90c0445df2873700d14e82cca5fbc8
refs/heads/master: f8e6cc013b896d75d6ce4ec9e168014af1257fd8
6 changes: 4 additions & 2 deletions trunk/fs/nilfs2/btnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,15 @@ int nilfs_btnode_submit_block(struct address_space *btnc, __u64 blocknr,
{
struct buffer_head *bh;
struct inode *inode = NILFS_BTNC_I(btnc);
struct page *page;
int err;

bh = nilfs_grab_buffer(inode, btnc, blocknr, 1 << BH_NILFS_Node);
if (unlikely(!bh))
return -ENOMEM;

err = -EEXIST; /* internal code */
page = bh->b_page;

if (buffer_uptodate(bh) || buffer_dirty(bh))
goto found;
Expand Down Expand Up @@ -143,8 +145,8 @@ int nilfs_btnode_submit_block(struct address_space *btnc, __u64 blocknr,
*pbh = bh;

out_locked:
unlock_page(bh->b_page);
page_cache_release(bh->b_page);
unlock_page(page);
page_cache_release(page);
return err;
}

Expand Down

0 comments on commit 7d750d0

Please sign in to comment.