diff options
author | Andrew Morton <akpm@osdl.org> | 2003-07-06 05:40:50 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-06 05:40:50 -0700 |
commit | 3edb027feea281c11a7ef5e56bcf3489878d3056 (patch) | |
tree | fde251e4094122e72d9be5b21222e806832a2f63 /fs/ext3/xattr.c | |
parent | 574dd5965a0bfeb60d46de8b3b97a8d78784f145 (diff) | |
download | history-3edb027feea281c11a7ef5e56bcf3489878d3056.tar.gz |
[PATCH] xattr: blockdev inode selection fix
From: Andreas Gruenbacher <agruen@suse.de>
The inode->i_bdev field is not the same as inode->i_sb->s_bdev or bh->b_bdev.
We must compare inode->i_sb->s_bdev with bh->b_bdev, or else equal extended
attribute block will not be found.
Diffstat (limited to 'fs/ext3/xattr.c')
-rw-r--r-- | fs/ext3/xattr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ext3/xattr.c b/fs/ext3/xattr.c index 5069ec2c5b622c..578cfad5f6bf6e 100644 --- a/fs/ext3/xattr.c +++ b/fs/ext3/xattr.c @@ -1010,7 +1010,8 @@ ext3_xattr_cache_find(struct inode *inode, struct ext3_xattr_header *header) if (!header->h_hash) return NULL; /* never share */ ea_idebug(inode, "looking for cached blocks [%x]", (int)hash); - ce = mb_cache_entry_find_first(ext3_xattr_cache, 0, inode->i_bdev, hash); + ce = mb_cache_entry_find_first(ext3_xattr_cache, 0, + inode->i_sb->s_bdev, hash); while (ce) { struct buffer_head *bh = sb_bread(inode->i_sb, ce->e_block); @@ -1030,7 +1031,7 @@ ext3_xattr_cache_find(struct inode *inode, struct ext3_xattr_header *header) return bh; } brelse(bh); - ce = mb_cache_entry_find_next(ce, 0, inode->i_bdev, hash); + ce = mb_cache_entry_find_next(ce, 0, inode->i_sb->s_bdev, hash); } return NULL; } |