Skip to contentSkip to conversation

vfs: clean up indenting in lookup_open()

PATCH In review Dan Carpenter 3 participants 3 messages Sep 15

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vfs: clean up indenting in lookup_open()

These lines are indented too far. Delete a tab.

---
 fs/namei.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
fs/namei.c +3 -3
index 1dd4ec7d0e62..48b28ed44a9e 100644
@@ -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);
 	}
Signature · 1 line
2.53.0
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Dan Carpenter

These lines are indented too far. Delete a tab.

Looks good. Feel free to add:

Honza

Quoted 24 lines
---
 fs/namei.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
fs/namei.c +3 -3
index 1dd4ec7d0e62..48b28ed44a9e 100644
@@ -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);
 	}
Signature · 1 line
2.53.0
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
#2 lore raw

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/[email protected]/

Quoted 41 lines

Op 15-09-2026 22:40 CEST schreef Jan Kara <[email protected]>:

Quoted 3 lines · Dan Carpenter

These lines are indented too far. Delete a tab.

Looks good. Feel free to add:

Honza

Quoted 24 lines
---
 fs/namei.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
fs/namei.c +3 -3
index 1dd4ec7d0e62..48b28ed44a9e 100644
@@ -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);
 	}
Signature · 1 line
2.53.0
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR