diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/ext3/xattr.c | 7 | ||||
| -rw-r--r-- | fs/jbd/transaction.c | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/fs/ext3/xattr.c b/fs/ext3/xattr.c index 6fbda077bdbe..66ed5a09a3e6 100644 --- a/fs/ext3/xattr.c +++ b/fs/ext3/xattr.c @@ -1050,12 +1050,10 @@ ext3_xattr_cache_find(handle_t *handle, struct inode *inode, ext3_error(inode->i_sb, "ext3_xattr_cache_find", "inode %ld: block %ld read error", inode->i_ino, (unsigned long) ce->e_block); - } else { + } else if (ext3_journal_get_write_access_credits( + handle, bh, credits) == 0) { /* ext3_journal_get_write_access() requires an unlocked * bh, which complicates things here. */ - if (ext3_journal_get_write_access_credits(handle, bh, - credits) != 0) - return NULL; lock_buffer(bh); if (le32_to_cpu(HDR(bh)->h_refcount) > EXT3_XATTR_REFCOUNT_MAX) { @@ -1070,6 +1068,7 @@ ext3_xattr_cache_find(handle_t *handle, struct inode *inode, } unlock_buffer(bh); journal_release_buffer(handle, bh, *credits); + *credits = 0; brelse(bh); } ce = mb_cache_entry_find_next(ce, 0, inode->i_sb->s_bdev, hash); diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c index 2861ee44cb11..83de01cd53f5 100644 --- a/fs/jbd/transaction.c +++ b/fs/jbd/transaction.c @@ -742,7 +742,7 @@ int journal_get_write_access(handle_t *handle, /* We do not want to get caught playing with fields which the * log thread also manipulates. Make sure that the buffer * completes any outstanding IO before proceeding. */ - rc = do_get_write_access(handle, jh, 0, NULL); + rc = do_get_write_access(handle, jh, 0, credits); journal_put_journal_head(jh); return rc; } |
