diff options
Diffstat (limited to 'fs/reiserfs/super.c')
-rw-r--r-- | fs/reiserfs/super.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 972250c62896..3567fb9e3fb1 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/mnt_namespace.h> | 27 | #include <linux/mnt_namespace.h> |
28 | #include <linux/mount.h> | 28 | #include <linux/mount.h> |
29 | #include <linux/namei.h> | 29 | #include <linux/namei.h> |
30 | #include <linux/crc32.h> | ||
30 | 31 | ||
31 | struct file_system_type reiserfs_fs_type; | 32 | struct file_system_type reiserfs_fs_type; |
32 | 33 | ||
@@ -447,13 +448,11 @@ int remove_save_link(struct inode *inode, int truncate) | |||
447 | static void reiserfs_kill_sb(struct super_block *s) | 448 | static void reiserfs_kill_sb(struct super_block *s) |
448 | { | 449 | { |
449 | if (REISERFS_SB(s)) { | 450 | if (REISERFS_SB(s)) { |
450 | #ifdef CONFIG_REISERFS_FS_XATTR | ||
451 | if (REISERFS_SB(s)->xattr_root) { | 451 | if (REISERFS_SB(s)->xattr_root) { |
452 | d_invalidate(REISERFS_SB(s)->xattr_root); | 452 | d_invalidate(REISERFS_SB(s)->xattr_root); |
453 | dput(REISERFS_SB(s)->xattr_root); | 453 | dput(REISERFS_SB(s)->xattr_root); |
454 | REISERFS_SB(s)->xattr_root = NULL; | 454 | REISERFS_SB(s)->xattr_root = NULL; |
455 | } | 455 | } |
456 | #endif | ||
457 | if (REISERFS_SB(s)->priv_root) { | 456 | if (REISERFS_SB(s)->priv_root) { |
458 | d_invalidate(REISERFS_SB(s)->priv_root); | 457 | d_invalidate(REISERFS_SB(s)->priv_root); |
459 | dput(REISERFS_SB(s)->priv_root); | 458 | dput(REISERFS_SB(s)->priv_root); |
@@ -1315,8 +1314,7 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg) | |||
1315 | } | 1314 | } |
1316 | 1315 | ||
1317 | out_ok: | 1316 | out_ok: |
1318 | kfree(s->s_options); | 1317 | replace_mount_options(s, new_opts); |
1319 | s->s_options = new_opts; | ||
1320 | return 0; | 1318 | return 0; |
1321 | 1319 | ||
1322 | out_err: | 1320 | out_err: |
@@ -1841,7 +1839,8 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) | |||
1841 | goto error; | 1839 | goto error; |
1842 | } | 1840 | } |
1843 | 1841 | ||
1844 | if ((errval = reiserfs_xattr_init(s, s->s_flags))) { | 1842 | if ((errval = reiserfs_lookup_privroot(s)) || |
1843 | (errval = reiserfs_xattr_init(s, s->s_flags))) { | ||
1845 | dput(s->s_root); | 1844 | dput(s->s_root); |
1846 | s->s_root = NULL; | 1845 | s->s_root = NULL; |
1847 | goto error; | 1846 | goto error; |
@@ -1854,7 +1853,8 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) | |||
1854 | reiserfs_info(s, "using 3.5.x disk format\n"); | 1853 | reiserfs_info(s, "using 3.5.x disk format\n"); |
1855 | } | 1854 | } |
1856 | 1855 | ||
1857 | if ((errval = reiserfs_xattr_init(s, s->s_flags))) { | 1856 | if ((errval = reiserfs_lookup_privroot(s)) || |
1857 | (errval = reiserfs_xattr_init(s, s->s_flags))) { | ||
1858 | dput(s->s_root); | 1858 | dput(s->s_root); |
1859 | s->s_root = NULL; | 1859 | s->s_root = NULL; |
1860 | goto error; | 1860 | goto error; |
@@ -1904,6 +1904,10 @@ static int reiserfs_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
1904 | buf->f_bsize = dentry->d_sb->s_blocksize; | 1904 | buf->f_bsize = dentry->d_sb->s_blocksize; |
1905 | /* changed to accommodate gcc folks. */ | 1905 | /* changed to accommodate gcc folks. */ |
1906 | buf->f_type = REISERFS_SUPER_MAGIC; | 1906 | buf->f_type = REISERFS_SUPER_MAGIC; |
1907 | buf->f_fsid.val[0] = (u32)crc32_le(0, rs->s_uuid, sizeof(rs->s_uuid)/2); | ||
1908 | buf->f_fsid.val[1] = (u32)crc32_le(0, rs->s_uuid + sizeof(rs->s_uuid)/2, | ||
1909 | sizeof(rs->s_uuid)/2); | ||
1910 | |||
1907 | return 0; | 1911 | return 0; |
1908 | } | 1912 | } |
1909 | 1913 | ||