On Fri, Jan 30, 2015 at 05:20:54PM +0800, Qu Wenruo wrote:
> --- a/fs/btrfs/sysfs.c
> +++ b/fs/btrfs/sysfs.c
> @@ -154,9 +154,15 @@ static ssize_t btrfs_feature_attr_store(struct kobject
> *kobj,
> btrfs_info(fs_info, "%s %s feature flag",
> val ? "Setting" : "Clearing", fa->kobj_attr.attr.name);
>
> + ret = sb_want_write(fs_info->sb);
> + if (ret)
> + return ret;
Same here, move it to the beginning, right after fs_info is validated.
> +
> trans = btrfs_start_transaction(fs_info->fs_root, 0);
> - if (IS_ERR(trans))
> - return PTR_ERR(trans);
> + if (IS_ERR(trans)) {
> + ret = PTR_ERR(trans);
> + goto out;
> + }
>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html