Skip to contentSkip to conversation

vfs: remove extraneous NULL d_inode check from do_filp_open

PATCH New Jeff Layton 1 participant 1 message Nov 10, 2009 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vfs: remove extraneous NULL d_inode check from do_filp_open

We can't get to this point unless it's a valid pointer.

---
 fs/namei.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/namei.c +1 -1
index d11f404..3374917 100644
@@ -1805,7 +1805,7 @@ do_last:
 
 	path_to_nameidata(&path, &nd);
 	error = -EISDIR;
-	if (path.dentry->d_inode && S_ISDIR(path.dentry->d_inode->i_mode))
+	if (S_ISDIR(path.dentry->d_inode->i_mode))
 		goto exit;
 ok:
 	/*
Signature · 1 line
1.5.5.6