diff options
author | Jeff Mahoney <jeffm@suse.com> | 2009-05-17 01:02:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-17 14:45:45 -0400 |
commit | ceb5edc457f07956c82dccfb54ca8ae7e2a399f0 (patch) | |
tree | 0b58e5a5e359090e47583ec0b49e7b29af0b2179 /fs/reiserfs/super.c | |
parent | 12abb35a03e32c97235fcefdcf2d851be9f82dc2 (diff) |
reiserfs: deal with NULL xattr root w/ xattrs disabled
This avoids an Oops in open_xa_root that can occur when deleting a file
with xattrs disabled. It assumes that the xattr root will be there, and
that is not guaranteed.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/reiserfs/super.c')
-rw-r--r-- | fs/reiserfs/super.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 1215a4f50cd2..3567fb9e3fb1 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -448,13 +448,11 @@ int remove_save_link(struct inode *inode, int truncate) | |||
448 | static void reiserfs_kill_sb(struct super_block *s) | 448 | static void reiserfs_kill_sb(struct super_block *s) |
449 | { | 449 | { |
450 | if (REISERFS_SB(s)) { | 450 | if (REISERFS_SB(s)) { |
451 | #ifdef CONFIG_REISERFS_FS_XATTR | ||
452 | if (REISERFS_SB(s)->xattr_root) { | 451 | if (REISERFS_SB(s)->xattr_root) { |
453 | d_invalidate(REISERFS_SB(s)->xattr_root); | 452 | d_invalidate(REISERFS_SB(s)->xattr_root); |
454 | dput(REISERFS_SB(s)->xattr_root); | 453 | dput(REISERFS_SB(s)->xattr_root); |
455 | REISERFS_SB(s)->xattr_root = NULL; | 454 | REISERFS_SB(s)->xattr_root = NULL; |
456 | } | 455 | } |
457 | #endif | ||
458 | if (REISERFS_SB(s)->priv_root) { | 456 | if (REISERFS_SB(s)->priv_root) { |
459 | d_invalidate(REISERFS_SB(s)->priv_root); | 457 | d_invalidate(REISERFS_SB(s)->priv_root); |
460 | dput(REISERFS_SB(s)->priv_root); | 458 | dput(REISERFS_SB(s)->priv_root); |