mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
fsnotify: pass a file instead of an inode to open, read, and write
fanotify, the upcoming notification system actually needs a struct path so it can do opens in the context of listeners, and it needs a file so it can get f_flags from the original process. Close was the only operation that already was passing a struct file to the notification hook. This patch passes a file for access, modify, and open as well as they are easily available to these hooks. Signed-off-by: Eric Paris <[email protected]>
This commit is contained in:
parent
8112e2d6a7
commit
2a12a9d781
6 changed files with 20 additions and 18 deletions
|
|
@ -1193,11 +1193,10 @@ out:
|
|||
if (iov != iovstack)
|
||||
kfree(iov);
|
||||
if ((ret + (type == READ)) > 0) {
|
||||
struct dentry *dentry = file->f_path.dentry;
|
||||
if (type == READ)
|
||||
fsnotify_access(dentry);
|
||||
fsnotify_access(file);
|
||||
else
|
||||
fsnotify_modify(dentry);
|
||||
fsnotify_modify(file);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue