|
@@ -84,16 +84,17 @@ void __fsnotify_update_child_dentry_flags(struct inode *inode)
|
|
}
|
|
}
|
|
|
|
|
|
/* Notify this dentry's parent about a child's events. */
|
|
/* Notify this dentry's parent about a child's events. */
|
|
-void __fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask)
|
|
|
|
|
|
+int __fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask)
|
|
{
|
|
{
|
|
struct dentry *parent;
|
|
struct dentry *parent;
|
|
struct inode *p_inode;
|
|
struct inode *p_inode;
|
|
|
|
+ int ret = 0;
|
|
|
|
|
|
if (!dentry)
|
|
if (!dentry)
|
|
dentry = path->dentry;
|
|
dentry = path->dentry;
|
|
|
|
|
|
if (!(dentry->d_flags & DCACHE_FSNOTIFY_PARENT_WATCHED))
|
|
if (!(dentry->d_flags & DCACHE_FSNOTIFY_PARENT_WATCHED))
|
|
- return;
|
|
|
|
|
|
+ return 0;
|
|
|
|
|
|
parent = dget_parent(dentry);
|
|
parent = dget_parent(dentry);
|
|
p_inode = parent->d_inode;
|
|
p_inode = parent->d_inode;
|
|
@@ -106,14 +107,16 @@ void __fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask)
|
|
mask |= FS_EVENT_ON_CHILD;
|
|
mask |= FS_EVENT_ON_CHILD;
|
|
|
|
|
|
if (path)
|
|
if (path)
|
|
- fsnotify(p_inode, mask, path, FSNOTIFY_EVENT_PATH,
|
|
|
|
- dentry->d_name.name, 0);
|
|
|
|
|
|
+ ret = fsnotify(p_inode, mask, path, FSNOTIFY_EVENT_PATH,
|
|
|
|
+ dentry->d_name.name, 0);
|
|
else
|
|
else
|
|
- fsnotify(p_inode, mask, dentry->d_inode, FSNOTIFY_EVENT_INODE,
|
|
|
|
- dentry->d_name.name, 0);
|
|
|
|
|
|
+ ret = fsnotify(p_inode, mask, dentry->d_inode, FSNOTIFY_EVENT_INODE,
|
|
|
|
+ dentry->d_name.name, 0);
|
|
}
|
|
}
|
|
|
|
|
|
dput(parent);
|
|
dput(parent);
|
|
|
|
+
|
|
|
|
+ return ret;
|
|
}
|
|
}
|
|
EXPORT_SYMBOL_GPL(__fsnotify_parent);
|
|
EXPORT_SYMBOL_GPL(__fsnotify_parent);
|
|
|
|
|