diff mbox

[v2,24/35] ubifs: suspend & resume quota properly in ubifs_remount

Message ID 1438235311-23788-25-git-send-email-yangds.fnst@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Yang Dongsheng July 30, 2015, 5:48 a.m. UTC
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
---
 fs/ubifs/super.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Richard Weinberger Aug. 8, 2015, 9:24 p.m. UTC | #1
Am 30.07.2015 um 07:48 schrieb Dongsheng Yang:
> Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
> ---
>  fs/ubifs/super.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
> index 6ed35e2..06dd7af 100644
> --- a/fs/ubifs/super.c
> +++ b/fs/ubifs/super.c
> @@ -2128,11 +2128,13 @@ static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data)
>  		err = ubifs_remount_rw(c);
>  		if (err)
>  			return err;
> +		dquot_resume(sb, -1);
>  	} else if (!c->ro_mount && (*flags & MS_RDONLY)) {
>  		if (c->ro_error) {
>  			ubifs_msg(c, "cannot re-mount R/O due to prior errors");
>  			return -EROFS;
>  		}
> +		dquot_suspend(sb, -1);

Is it really safe to ignore the return values of both function?

Beside of that,
Reviewed-by: Richard Weinberger <richard@nod.at>

Thanks,
//richard
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yang Dongsheng Aug. 10, 2015, 2:04 a.m. UTC | #2
On 08/09/2015 05:24 AM, Richard Weinberger wrote:
> Am 30.07.2015 um 07:48 schrieb Dongsheng Yang:
>> Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
>> ---
>>   fs/ubifs/super.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
>> index 6ed35e2..06dd7af 100644
>> --- a/fs/ubifs/super.c
>> +++ b/fs/ubifs/super.c
>> @@ -2128,11 +2128,13 @@ static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data)
>>   		err = ubifs_remount_rw(c);
>>   		if (err)
>>   			return err;
>> +		dquot_resume(sb, -1);
>>   	} else if (!c->ro_mount && (*flags & MS_RDONLY)) {
>>   		if (c->ro_error) {
>>   			ubifs_msg(c, "cannot re-mount R/O due to prior errors");
>>   			return -EROFS;
>>   		}
>> +		dquot_suspend(sb, -1);
>
> Is it really safe to ignore the return values of both function?

Good point. I will do it.

Thanx
Yang
>
> Beside of that,
> Reviewed-by: Richard Weinberger <richard@nod.at>
>
> Thanks,
> //richard
> .
>

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 6ed35e2..06dd7af 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -2128,11 +2128,13 @@  static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data)
 		err = ubifs_remount_rw(c);
 		if (err)
 			return err;
+		dquot_resume(sb, -1);
 	} else if (!c->ro_mount && (*flags & MS_RDONLY)) {
 		if (c->ro_error) {
 			ubifs_msg(c, "cannot re-mount R/O due to prior errors");
 			return -EROFS;
 		}
+		dquot_suspend(sb, -1);
 		ubifs_remount_ro(c);
 	}