ANDROID: sdcardfs: port to 4.14
authorDaniel Rosenberg <drosen@google.com>
Thu, 25 Jan 2018 01:25:05 +0000 (17:25 -0800)
committerDaniel Rosenberg <drosen@google.com>
Tue, 30 Jan 2018 03:40:13 +0000 (19:40 -0800)
Change-Id: I03271d8e8229ce6f22f337dc7d1938e0bf060f2a
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 70278506

fs/sdcardfs/inode.c
fs/sdcardfs/mmap.c

index c3763c50b018fd0327a77ce8a6547e2c228d6099..08ef11e94cca21a05b7f380e88497cdf2a04d906 100644 (file)
@@ -850,10 +850,11 @@ static int sdcardfs_fillattr(struct vfsmount *mnt,
        data_put(top);
        return 0;
 }
-
-static int sdcardfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
-                struct kstat *stat)
+static int sdcardfs_getattr(const struct path *path, struct kstat *stat,
+                               u32 request_mask, unsigned int flags)
 {
+       struct vfsmount *mnt = path->mnt;
+       struct dentry *dentry = path->dentry;
        struct kstat lower_stat;
        struct path lower_path;
        struct dentry *parent;
@@ -867,7 +868,7 @@ static int sdcardfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
        dput(parent);
 
        sdcardfs_get_lower_path(dentry, &lower_path);
-       err = vfs_getattr(&lower_path, &lower_stat);
+       err = vfs_getattr(&lower_path, &lower_stat, request_mask, flags);
        if (err)
                goto out;
        sdcardfs_copy_and_fix_attrs(d_inode(dentry),
index 391d2a7d10e9ed0a48c8d064d1db7b44ebb70f2b..2847c0ec5e0a053d3f23293d153c3864365a0d38 100644 (file)
 
 #include "sdcardfs.h"
 
-static int sdcardfs_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
+static int sdcardfs_fault(struct vm_fault *vmf)
 {
        int err;
        struct file *file;
        const struct vm_operations_struct *lower_vm_ops;
 
-       file = (struct file *)vma->vm_private_data;
+       file = (struct file *)vmf->vma->vm_private_data;
        lower_vm_ops = SDCARDFS_F(file)->lower_vm_ops;
        BUG_ON(!lower_vm_ops);
 
-       err = lower_vm_ops->fault(vma, vmf);
+       err = lower_vm_ops->fault(vmf);
        return err;
 }
 
@@ -48,20 +48,19 @@ static void sdcardfs_vm_close(struct vm_area_struct *vma)
        fput(file);
 }
 
-static int sdcardfs_page_mkwrite(struct vm_area_struct *vma,
-                              struct vm_fault *vmf)
+static int sdcardfs_page_mkwrite(struct vm_fault *vmf)
 {
        int err = 0;
        struct file *file;
        const struct vm_operations_struct *lower_vm_ops;
 
-       file = (struct file *)vma->vm_private_data;
+       file = (struct file *)vmf->vma->vm_private_data;
        lower_vm_ops = SDCARDFS_F(file)->lower_vm_ops;
        BUG_ON(!lower_vm_ops);
        if (!lower_vm_ops->page_mkwrite)
                goto out;
 
-       err = lower_vm_ops->page_mkwrite(vma, vmf);
+       err = lower_vm_ops->page_mkwrite(vmf);
 out:
        return err;
 }