[PATCH] vfs: clean up indenting in lookup_open()

Dan Carpenter posted 1 patch 1 week, 2 days ago
fs/namei.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
[PATCH] vfs: clean up indenting in lookup_open()
Posted by Dan Carpenter 1 week, 2 days ago
These lines are indented too far.  Delete a tab.

Signed-off-by: Dan Carpenter <error27@gmail.com>
---
 fs/namei.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/namei.c b/fs/namei.c
index 1dd4ec7d0e62..48b28ed44a9e 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -4636,9 +4636,9 @@ static struct dentry *lookup_open(struct nameidata *nd, struct file *file,
 	if (create_dir) {
 		struct dentry *res = vfs_mkdir_no_perm(idmap, dir_inode, dentry,
 						       mode, &delegated_inode);
-			error = PTR_ERR_OR_ZERO(res);
-			if (!error)
-				dentry = res;
+		error = PTR_ERR_OR_ZERO(res);
+		if (!error)
+			dentry = res;
 	} else {
 		error = vfs_create_no_perm(idmap, dentry, mode, &delegated_inode);
 	}
-- 
2.53.0
Re: [PATCH] vfs: clean up indenting in lookup_open()
Posted by Jan Kara 1 week, 2 days ago
On Tue 15-09-26 19:37:53, Dan Carpenter wrote:
> These lines are indented too far.  Delete a tab.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/namei.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/namei.c b/fs/namei.c
> index 1dd4ec7d0e62..48b28ed44a9e 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -4636,9 +4636,9 @@ static struct dentry *lookup_open(struct nameidata *nd, struct file *file,
>  	if (create_dir) {
>  		struct dentry *res = vfs_mkdir_no_perm(idmap, dir_inode, dentry,
>  						       mode, &delegated_inode);
> -			error = PTR_ERR_OR_ZERO(res);
> -			if (!error)
> -				dentry = res;
> +		error = PTR_ERR_OR_ZERO(res);
> +		if (!error)
> +			dentry = res;
>  	} else {
>  		error = vfs_create_no_perm(idmap, dentry, mode, &delegated_inode);
>  	}
> -- 
> 2.53.0
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR
Re: [PATCH] vfs: clean up indenting in lookup_open()
Posted by Jori Koolstra 1 week, 2 days ago
This is about linux-next, right?

This should not have been pulled into next yet. I rebased this series after
Neil's vfs_lookup_open() landed in 7.3. There were some rebasing conflicts that
I fixed, but I left something out, which I fixed later but forgot to format-patch
again when sending out (including this whitespace). Christian pointed this
out to me, and I have fixed these things in v6 of O_CREAT|O_DIRECTORY.[1]

Please, pull that into vfs tree and then next. Some of the patches also need an
explicit review still, although Neil looked through most of it. Maybe you want
to take a look as well, Jan? :)

[1]: https://lore.kernel.org/linux-fsdevel/20260913185016.523376-1-jkoolstra@xs4all.nl/

> Op 15-09-2026 22:40 CEST schreef Jan Kara <jack@suse.cz>:
> 
>  
> On Tue 15-09-26 19:37:53, Dan Carpenter wrote:
> > These lines are indented too far.  Delete a tab.
> > 
> > Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> Looks good. Feel free to add:
> 
> Reviewed-by: Jan Kara <jack@suse.cz>
> 
> 								Honza
> 
> > ---
> >  fs/namei.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/fs/namei.c b/fs/namei.c
> > index 1dd4ec7d0e62..48b28ed44a9e 100644
> > --- a/fs/namei.c
> > +++ b/fs/namei.c
> > @@ -4636,9 +4636,9 @@ static struct dentry *lookup_open(struct nameidata *nd, struct file *file,
> >  	if (create_dir) {
> >  		struct dentry *res = vfs_mkdir_no_perm(idmap, dir_inode, dentry,
> >  						       mode, &delegated_inode);
> > -			error = PTR_ERR_OR_ZERO(res);
> > -			if (!error)
> > -				dentry = res;
> > +		error = PTR_ERR_OR_ZERO(res);
> > +		if (!error)
> > +			dentry = res;
> >  	} else {
> >  		error = vfs_create_no_perm(idmap, dentry, mode, &delegated_inode);
> >  	}
> > -- 
> > 2.53.0
> > 
> -- 
> Jan Kara <jack@suse.com>
> SUSE Labs, CR