vfs: change d_canonical_path to take two paths
authorDaniel Rosenberg <drosen@google.com>
Fri, 22 Apr 2016 07:00:14 +0000 (00:00 -0700)
committerAmit Pundir <amit.pundir@linaro.org>
Thu, 19 May 2016 07:05:13 +0000 (12:35 +0530)
bug: 23904372
Change-Id: I4a686d64b6de37decf60019be1718e1d820193e6
Signed-off-by: Daniel Rosenberg <drosen@google.com>
fs/notify/inotify/inotify_user.c
fs/sdcardfs/dentry.c
include/linux/dcache.h

index f72f3b25b3f22b92ab470d3711c008f3e8a425b1..e2893f17dde24e88b2ac9e17708179db4ce11911 100644 (file)
@@ -746,7 +746,7 @@ SYSCALL_DEFINE3(inotify_add_watch, int, fd, const char __user *, pathname,
        /* support stacked filesystems */
        if(path.dentry && path.dentry->d_op) {
                if (path.dentry->d_op->d_canonical_path) {
-                       path.dentry->d_op->d_canonical_path(path.dentry, &alteredpath);
+                       path.dentry->d_op->d_canonical_path(&path, &alteredpath);
                        canonical_path = &alteredpath;
                        path_put(&path);
                }
index ba165ef11e272b384b5f5686849123aa3a031263..971928ab6c216eeea41db43fd47566001329ab65 100644 (file)
@@ -172,11 +172,15 @@ static int sdcardfs_cmp_ci(const struct dentry *parent,
        return 1;
 }
 
+static void sdcardfs_canonical_path(const struct path *path, struct path *actual_path) {
+       sdcardfs_get_real_lower(path->dentry, actual_path);
+}
+
 const struct dentry_operations sdcardfs_ci_dops = {
        .d_revalidate   = sdcardfs_d_revalidate,
        .d_release      = sdcardfs_d_release,
        .d_hash         = sdcardfs_hash_ci,
        .d_compare      = sdcardfs_cmp_ci,
-       .d_canonical_path = sdcardfs_get_real_lower,
+       .d_canonical_path = sdcardfs_canonical_path,
 };
 
index e4221f7c5b53a82492a2a03ac5d47bcd93d3ee5e..bdbb2d490d2dcfb871d8594a84869812c44259f4 100644 (file)
@@ -161,7 +161,7 @@ struct dentry_operations {
        struct vfsmount *(*d_automount)(struct path *);
        int (*d_manage)(struct dentry *, bool);
        struct inode *(*d_select_inode)(struct dentry *, unsigned);
-       void (*d_canonical_path)(const struct dentry *, struct path *);
+       void (*d_canonical_path)(const struct path *, struct path *);
        struct dentry *(*d_real)(struct dentry *, struct inode *);
 } ____cacheline_aligned;