Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Tetsuhiro Kohada <kohada.t2@gmail.com>
To: youngjun <her0gyugyu@gmail.com>,
	Namjae Jeon <namjae.jeon@samsung.com>,
	Sungjong Seo <sj1557.seo@samsung.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] exfat: change exfat_set_vol_flags() return type void.
Date: Fri, 17 Jul 2020 15:35:22 +0900	[thread overview]
Message-ID: <cb125a5c-7e3f-2480-8a20-55805ec554ef@gmail.com> (raw)
In-Reply-To: <20200715135000.86155-1-her0gyugyu@gmail.com>

On 2020/07/15 22:50, youngjun wrote:
> exfat_set_vol_flags() always return 0.
> So, change function return type as void.

On the contrary, I think it should be fixed to return an appropriate error.


> @@ -114,7 +113,7 @@ int exfat_set_vol_flags(struct super_block *sb, unsigned short new_flag)
>   	 * if this volume has been mounted with read-only
>   	 */
>   	if (sb_rdonly(sb))
> -		return 0;
> +		return;

Some other FileSystems return -EROFS.
exfat-fs may also need to return it.
(If so, the caller will also need to be modified)


>   	p_boot->vol_flags = cpu_to_le16(new_flag);
>   
> @@ -128,7 +127,7 @@ int exfat_set_vol_flags(struct super_block *sb, unsigned short new_flag)
>   
>   	if (sync)
>   		sync_dirty_buffer(sbi->boot_bh);
> -	return 0;
> +	return;

Shouldn't the execution result be returned when sync_dirty_buffer() is executed?


BR
---
Tetsuhiro Kohada <kohada.t2@gmail.com>

      reply	other threads:[~2020-07-17  6:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-15 13:50 youngjun
2020-07-17  6:35 ` Tetsuhiro Kohada [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb125a5c-7e3f-2480-8a20-55805ec554ef@gmail.com \
    --to=kohada.t2@gmail.com \
    --cc=her0gyugyu@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namjae.jeon@samsung.com \
    --cc=sj1557.seo@samsung.com \
    --subject='Re: [PATCH] exfat: change exfat_set_vol_flags() return type void.' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).