diff options
author | Andrew Morton <akpm@osdl.org> | 2003-07-17 19:25:23 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-17 19:25:23 -0700 |
commit | 2e1972fa2e109548cdb324b3aca0d29096c0ef90 (patch) | |
tree | 296632276f706c95334ff077e8376bbb2488920b /fs/ext3/xattr.c | |
parent | 7360a4406ce90f88120f10137373d737634ae6c2 (diff) | |
download | history-2e1972fa2e109548cdb324b3aca0d29096c0ef90.tar.gz |
[PATCH] ext3 extended attribute fixes
From: Andreas Gruenbacher <agruen@suse.de>
- Fix transaction credit exhaustion BUG.
- ext3_journal_get_write_access_credits failures break out of the loop in
1058, so <ce> is not released properly.
- <credits> must be reset after journal_release_buffer() in line 1072.
Diffstat (limited to 'fs/ext3/xattr.c')
-rw-r--r-- | fs/ext3/xattr.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/ext3/xattr.c b/fs/ext3/xattr.c index 6fbda077bdbe9b..66ed5a09a3e65b 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); |