Skip to contentSkip to conversation

fsnotify.h: Dropped redundant code.

PATCH New Radu Voicilas 1 participant 1 message Jan 24, 2011 Fsnotify: filesystem notification infrastructure

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fsnotify.h: Dropped redundant code.

The code that checks to see whether the provided dentry object is valid or not is redundant with the one that's in fs/notify/fsnotify.c in the __fsnotify_parent function:

    if (!dentry)
        dentry = path->dentry;
---
 include/linux/fsnotify.h |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
include/linux/fsnotify.h +0 -3
index 2a53f10..9e67a41 100644
@@ -27,9 +27,6 @@ static inline void fsnotify_d_instantiate(struct dentry *dentry,
 /* Notify this dentry's parent about a child's events. */
 static inline int fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask)
 {
-	if (!dentry)
-		dentry = path->dentry;
-
 	return __fsnotify_parent(path, dentry, mask);
 }
 
Signature · 1 line
1.7.0.4