Re: [PATCH 02/11] quota: Only module_put the format when existing

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

 



On Wed 14-08-19 14:18:25, Sascha Hauer wrote:
> For filesystems which do not have a quota_format_type such as upcoming
> UBIFS quota fmt may be NULL. Only put the format when it's non NULL.
> 
> Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>

But you do have quota format in the end. So is this patch needed?

								Honza

> ---
>  fs/quota/dquot.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
> index 3cb836351c22..b043468e53f2 100644
> --- a/fs/quota/dquot.c
> +++ b/fs/quota/dquot.c
> @@ -218,6 +218,9 @@ static struct quota_format_type *find_quota_format(int id)
>  
>  static void put_quota_format(struct quota_format_type *fmt)
>  {
> +	if (!fmt)
> +		return;
> +
>  	module_put(fmt->qf_owner);
>  }
>  
> -- 
> 2.20.1
> 
> 
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux