[PATCH v2 25/35] ubifs: record quota information about inode in ubifs_new_inode

Richard Weinberger richard at nod.at
Sat Aug 8 14:43:19 PDT 2015


Am 30.07.2015 um 07:48 schrieb Dongsheng Yang:
> Initialize quota and alloc a inode quota information in
> ubifs_new_inode(). Then quota would be aware of a new
> inode is allocated.
> 
> Signed-off-by: Dongsheng Yang <yangds.fnst at cn.fujitsu.com>
> ---
>  fs/ubifs/dir.c | 20 +++++++++++++++++---
>  1 file changed, 17 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
> index 8d93427..5bfce44 100644
> --- a/fs/ubifs/dir.c
> +++ b/fs/ubifs/dir.c
> @@ -41,6 +41,7 @@
>   */
>  
>  #include "ubifs.h"
> +#include <linux/quotaops.h>
>  
>  /**
>   * inherit_flags - inherit flags of the parent inode.
> @@ -90,12 +91,13 @@ struct inode *ubifs_new_inode(struct ubifs_info *c, const struct inode *dir,
>  {
>  	struct inode *inode;
>  	struct ubifs_inode *ui;
> +	int err = 0;
>  
>  	inode = new_inode(c->vfs_sb);
> -	ui = ubifs_inode(inode);
>  	if (!inode)
>  		return ERR_PTR(-ENOMEM);
>  
> +	ui = ubifs_inode(inode);

Seems like an unrelated change.
All ubifs_inode() does is a container_of(), inode = NULL won't hurt.

Thanks,
//richard



More information about the linux-mtd mailing list