diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index 102913f26152..09b4cf9c13cd 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h @@ -107,15 +107,17 @@ static inline int fsnotify_file(struct file *file, __u32 mask) ret = path->dentry->d_op->d_canonical_path(path, &lower_path); - if (ret) - return ret; + if (ret != -ENOSYS) { + if (ret) + return ret; - ret = fsnotify_parent(lower_path.dentry, mask, - &lower_path, FSNOTIFY_EVENT_PATH); - path_put(&lower_path); + ret = fsnotify_parent(lower_path.dentry, mask, + &lower_path, FSNOTIFY_EVENT_PATH); + path_put(&lower_path); - if (ret) - return ret; + if (ret) + return ret; + } } }