ANDROID: sdcardfs: notify lower file of opens
authorDaniel Rosenberg <drosen@google.com>
Thu, 21 Dec 2017 00:59:11 +0000 (16:59 -0800)
committerStricted <info@stricted.net>
Thu, 11 Oct 2018 16:03:45 +0000 (18:03 +0200)
fsnotify_open is not called within dentry_open,
so we need to call it ourselves.

Change-Id: Ia7f323b3d615e6ca5574e114e8a5d7973fb4c119
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 70706497

fs/sdcardfs/file.c

index c560360f25c07dd0c09d0eb10778cb571f6a199d..1665200f3156e91c940893a441000b5a2d004932 100644 (file)
@@ -18,6 +18,7 @@
  * General Public License.
  */
 
+#include <linux/fsnotify.h>
 #include "sdcardfs.h"
 #ifdef CONFIG_SDCARD_FS_FADV_NOACTIVE
 #include <linux/backing-dev.h>
@@ -260,6 +261,7 @@ static int sdcardfs_open(struct inode *inode, struct file *file)
                        fput(lower_file); /* fput calls dput for lower_dentry */
                }
        } else {
+               fsnotify_open(lower_file);
                sdcardfs_set_lower_file(file, lower_file);
        }