Skip to contentSkip to conversation

vfs: remove extraneous NULL d_inode check from do_filp_open

PATCH In review [email protected] 2 participants 2 messages Nov 17, 2009 – Dec 2, 2009 VFS

lore
Share & tools
lore
#0 lore raw

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

From: Jeff Layton <[email protected]>

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

---

 fs/namei.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/namei.c renamed from fs/namei.c~vfs-remove-extraneous-null-d_inode-check-from-do_filp_open +1 -1
diff -puN fs/namei.c~vfs-remove-extraneous-null-d_inode-check-from-do_filp_open fs/namei.c
@@ -1818,7 +1818,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:
 	/*

_