diff options
author | Kevin Hilman <khilman@linaro.org> | 2015-07-06 11:16:48 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-07-06 11:16:48 -0700 |
commit | c1c767d29bb2390308a35b69957b874e9446fe3b (patch) | |
tree | 6014e0b0838b2536c72452be4c5f5b2102922d04 /fs/btrfs/super.c | |
parent | 2cb9802eeb7f919f97df05b16ec128f4f5af366d (diff) | |
parent | 165797d05c15ab87ef7421c63a076ffa8477cbe4 (diff) |
Merge tag 'v3.14.45' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into linux-linaro-lsk-v3.14lsk-v3.14-15.07
This is the 3.14.45 stable release
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index d04db817be5c..92cbfbf2599e 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -906,6 +906,15 @@ find_root: if (IS_ERR(new_root)) return ERR_CAST(new_root); + if (!(sb->s_flags & MS_RDONLY)) { + int ret; + down_read(&fs_info->cleanup_work_sem); + ret = btrfs_orphan_cleanup(new_root); + up_read(&fs_info->cleanup_work_sem); + if (ret) + return ERR_PTR(ret); + } + dir_id = btrfs_root_dirid(&new_root->root_item); setup_root: location.objectid = dir_id; |