diff options
Diffstat (limited to 'fs/btrfs/super.c')
| -rw-r--r-- | fs/btrfs/super.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index c02f63356895..d04db817be5c 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
| @@ -566,7 +566,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) | |||
| 566 | kfree(num); | 566 | kfree(num); |
| 567 | 567 | ||
| 568 | if (info->max_inline) { | 568 | if (info->max_inline) { |
| 569 | info->max_inline = max_t(u64, | 569 | info->max_inline = min_t(u64, |
| 570 | info->max_inline, | 570 | info->max_inline, |
| 571 | root->sectorsize); | 571 | root->sectorsize); |
| 572 | } | 572 | } |
| @@ -855,6 +855,7 @@ static struct dentry *get_default_root(struct super_block *sb, | |||
| 855 | struct btrfs_path *path; | 855 | struct btrfs_path *path; |
| 856 | struct btrfs_key location; | 856 | struct btrfs_key location; |
| 857 | struct inode *inode; | 857 | struct inode *inode; |
| 858 | struct dentry *dentry; | ||
| 858 | u64 dir_id; | 859 | u64 dir_id; |
| 859 | int new = 0; | 860 | int new = 0; |
| 860 | 861 | ||
| @@ -925,7 +926,13 @@ setup_root: | |||
| 925 | return dget(sb->s_root); | 926 | return dget(sb->s_root); |
| 926 | } | 927 | } |
| 927 | 928 | ||
| 928 | return d_obtain_alias(inode); | 929 | dentry = d_obtain_alias(inode); |
| 930 | if (!IS_ERR(dentry)) { | ||
| 931 | spin_lock(&dentry->d_lock); | ||
| 932 | dentry->d_flags &= ~DCACHE_DISCONNECTED; | ||
| 933 | spin_unlock(&dentry->d_lock); | ||
| 934 | } | ||
| 935 | return dentry; | ||
| 929 | } | 936 | } |
| 930 | 937 | ||
| 931 | static int btrfs_fill_super(struct super_block *sb, | 938 | static int btrfs_fill_super(struct super_block *sb, |
| @@ -1996,7 +2003,7 @@ static void __exit exit_btrfs_fs(void) | |||
| 1996 | btrfs_hash_exit(); | 2003 | btrfs_hash_exit(); |
| 1997 | } | 2004 | } |
| 1998 | 2005 | ||
| 1999 | module_init(init_btrfs_fs) | 2006 | late_initcall(init_btrfs_fs); |
| 2000 | module_exit(exit_btrfs_fs) | 2007 | module_exit(exit_btrfs_fs) |
| 2001 | 2008 | ||
| 2002 | MODULE_LICENSE("GPL"); | 2009 | MODULE_LICENSE("GPL"); |
