linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sheng Yong <shengyong1@huawei.com>
To: Richard Weinberger <richard@nod.at>,
	<linux-mtd@lists.infradead.org>, <dedekind1@gmail.com>
Subject: Re: [PATCH] ubifs: return ENOSPC if running out of inode number
Date: Tue, 7 Feb 2017 16:19:41 +0800	[thread overview]
Message-ID: <5899831D.2070005@huawei.com> (raw)
In-Reply-To: <59847b44-37b8-a2f4-b993-dc48710036fe@nod.at>



On 2/7/2017 3:57 PM, Richard Weinberger wrote:
> Sheng Yong,
> 
> Am 07.02.2017 um 08:28 schrieb Sheng Yong:
>> Signed-off-by: Sheng Yong <shengyong1@huawei.com>
>> ---
>>  fs/ubifs/dir.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
>> index 528369f..00517dc 100644
>> --- a/fs/ubifs/dir.c
>> +++ b/fs/ubifs/dir.c
>> @@ -164,7 +164,7 @@ struct inode *ubifs_new_inode(struct ubifs_info *c, struct inode *dir,
>>  			ubifs_err(c, "out of inode numbers");
>>  			make_bad_inode(inode);
>>  			iput(inode);
>> -			return ERR_PTR(-EINVAL);
>> +			return ERR_PTR(-ENOSPC);
> 
> Can you please explain *why* this has to be changed to -ENOSPC?
Hi, Richard,

This is a trivial change. I think if there is not enough inode number available,
it means the filesystem has no room for the new file. So ENOSPC may be appropriate,
and some others filesystems returns ENOSPC in such scenario :)

thanks,
Sheng
> 
> Thanks,
> //richard
> 
> .
> 

  reply	other threads:[~2017-02-07  8:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07  7:28 [PATCH] ubifs: return ENOSPC if running out of inode number Sheng Yong
2017-02-07  7:57 ` Richard Weinberger
2017-02-07  8:19   ` Sheng Yong [this message]
2017-02-07  9:25     ` Richard Weinberger
2017-02-07 10:05       ` Sheng Yong

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=5899831D.2070005@huawei.com \
    --to=shengyong1@huawei.com \
    --cc=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).