ANDROID: sdcardfs: port to 4.14

Change-Id: I03271d8e8229ce6f22f337dc7d1938e0bf060f2a
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 70278506
This commit is contained in:
Daniel Rosenberg 2018-01-24 17:25:05 -08:00 committed by Amit Pundir
parent 2ec055a53e
commit 8de086031a
2 changed files with 11 additions and 11 deletions

View 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),

View file

@ -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;
}