From 8de086031a18449647f918a4a70675be5d985fa9 Mon Sep 17 00:00:00 2001 From: Daniel Rosenberg Date: Wed, 24 Jan 2018 17:25:05 -0800 Subject: [PATCH] ANDROID: sdcardfs: port to 4.14 Change-Id: I03271d8e8229ce6f22f337dc7d1938e0bf060f2a Signed-off-by: Daniel Rosenberg Bug: 70278506 --- fs/sdcardfs/inode.c | 9 +++++---- fs/sdcardfs/mmap.c | 13 ++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/sdcardfs/inode.c b/fs/sdcardfs/inode.c index c3763c50b018..08ef11e94cca 100644 --- a/fs/sdcardfs/inode.c +++ b/fs/sdcardfs/inode.c @@ -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), diff --git a/fs/sdcardfs/mmap.c b/fs/sdcardfs/mmap.c index 391d2a7d10e9..2847c0ec5e0a 100644 --- a/fs/sdcardfs/mmap.c +++ b/fs/sdcardfs/mmap.c @@ -20,17 +20,17 @@ #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; }