[PATCH] ubifs: return ENOSPC if running out of inode number

Richard Weinberger richard at nod.at
Mon Feb 6 23:57:14 PST 2017


Sheng Yong,

Am 07.02.2017 um 08:28 schrieb Sheng Yong:
> Signed-off-by: Sheng Yong <shengyong1 at 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?

Thanks,
//richard



More information about the linux-mtd mailing list