ANDROID: sdcardfs: port to 4.14
Change-Id: I03271d8e8229ce6f22f337dc7d1938e0bf060f2a Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 70278506
This commit is contained in:
parent
2ec055a53e
commit
8de086031a
2 changed files with 11 additions and 11 deletions
|
@ -850,10 +850,11 @@ static int sdcardfs_fillattr(struct vfsmount *mnt,
|
||||||
data_put(top);
|
data_put(top);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
static int sdcardfs_getattr(const struct path *path, struct kstat *stat,
|
||||||
static int sdcardfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
|
u32 request_mask, unsigned int flags)
|
||||||
struct kstat *stat)
|
|
||||||
{
|
{
|
||||||
|
struct vfsmount *mnt = path->mnt;
|
||||||
|
struct dentry *dentry = path->dentry;
|
||||||
struct kstat lower_stat;
|
struct kstat lower_stat;
|
||||||
struct path lower_path;
|
struct path lower_path;
|
||||||
struct dentry *parent;
|
struct dentry *parent;
|
||||||
|
@ -867,7 +868,7 @@ static int sdcardfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
|
||||||
dput(parent);
|
dput(parent);
|
||||||
|
|
||||||
sdcardfs_get_lower_path(dentry, &lower_path);
|
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)
|
if (err)
|
||||||
goto out;
|
goto out;
|
||||||
sdcardfs_copy_and_fix_attrs(d_inode(dentry),
|
sdcardfs_copy_and_fix_attrs(d_inode(dentry),
|
||||||
|
|
|
@ -20,17 +20,17 @@
|
||||||
|
|
||||||
#include "sdcardfs.h"
|
#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;
|
int err;
|
||||||
struct file *file;
|
struct file *file;
|
||||||
const struct vm_operations_struct *lower_vm_ops;
|
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;
|
lower_vm_ops = SDCARDFS_F(file)->lower_vm_ops;
|
||||||
BUG_ON(!lower_vm_ops);
|
BUG_ON(!lower_vm_ops);
|
||||||
|
|
||||||
err = lower_vm_ops->fault(vma, vmf);
|
err = lower_vm_ops->fault(vmf);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,20 +48,19 @@ static void sdcardfs_vm_close(struct vm_area_struct *vma)
|
||||||
fput(file);
|
fput(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sdcardfs_page_mkwrite(struct vm_area_struct *vma,
|
static int sdcardfs_page_mkwrite(struct vm_fault *vmf)
|
||||||
struct vm_fault *vmf)
|
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
struct file *file;
|
struct file *file;
|
||||||
const struct vm_operations_struct *lower_vm_ops;
|
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;
|
lower_vm_ops = SDCARDFS_F(file)->lower_vm_ops;
|
||||||
BUG_ON(!lower_vm_ops);
|
BUG_ON(!lower_vm_ops);
|
||||||
if (!lower_vm_ops->page_mkwrite)
|
if (!lower_vm_ops->page_mkwrite)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
err = lower_vm_ops->page_mkwrite(vma, vmf);
|
err = lower_vm_ops->page_mkwrite(vmf);
|
||||||
out:
|
out:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue