Re: [PATCH v8 9/9] btrfs: Use sb_want_write() to protect sysfs feature change.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 12, 2015 at 09:50:14AM +0800, Qu Wenruo wrote:
> Just like label change, use sb_want_write() to do a correct protection.
> 
> Signed-off-by: Qu Wenruo <quwenruo@xxxxxxxxxxxxxx>
> ---
> v4:
>   Newly introduced.
> v5:
>   Change to sb_want_write().
> v6:
>   Move sb_want_write() to the beginning of the function.
> v7:
>   None
> v8:
>   Move sb_want_write() after get fs_info.
> ---
>  fs/btrfs/sysfs.c | 27 ++++++++++++++++++---------
>  1 file changed, 18 insertions(+), 9 deletions(-)
> 
> diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
> index 7e548f7..2e8cc34 100644
> --- a/fs/btrfs/sysfs.c
> +++ b/fs/btrfs/sysfs.c
> @@ -119,12 +119,16 @@ static ssize_t btrfs_feature_attr_store(struct kobject *kobj,
>  
>  	fs_info = to_fs_info(kobj);
>  	if (!fs_info)
> -		return -EPERM;
> +		ret = -EPERM;

Same patch version (v8), different code and buggy in a different way :)
but the fix is the same.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux