mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
switch vfs_getattr() to struct path
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
e72837e3e7
commit
3dadecce20
14 changed files with 40 additions and 35 deletions
13
fs/stat.c
13
fs/stat.c
|
|
@ -37,17 +37,17 @@ void generic_fillattr(struct inode *inode, struct kstat *stat)
|
|||
|
||||
EXPORT_SYMBOL(generic_fillattr);
|
||||
|
||||
int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
|
||||
int vfs_getattr(struct path *path, struct kstat *stat)
|
||||
{
|
||||
struct inode *inode = dentry->d_inode;
|
||||
struct inode *inode = path->dentry->d_inode;
|
||||
int retval;
|
||||
|
||||
retval = security_inode_getattr(mnt, dentry);
|
||||
retval = security_inode_getattr(path->mnt, path->dentry);
|
||||
if (retval)
|
||||
return retval;
|
||||
|
||||
if (inode->i_op->getattr)
|
||||
return inode->i_op->getattr(mnt, dentry, stat);
|
||||
return inode->i_op->getattr(path->mnt, path->dentry, stat);
|
||||
|
||||
generic_fillattr(inode, stat);
|
||||
return 0;
|
||||
|
|
@ -61,8 +61,7 @@ int vfs_fstat(unsigned int fd, struct kstat *stat)
|
|||
int error = -EBADF;
|
||||
|
||||
if (f.file) {
|
||||
error = vfs_getattr(f.file->f_path.mnt, f.file->f_path.dentry,
|
||||
stat);
|
||||
error = vfs_getattr(&f.file->f_path, stat);
|
||||
fdput(f);
|
||||
}
|
||||
return error;
|
||||
|
|
@ -89,7 +88,7 @@ retry:
|
|||
if (error)
|
||||
goto out;
|
||||
|
||||
error = vfs_getattr(path.mnt, path.dentry, stat);
|
||||
error = vfs_getattr(&path, stat);
|
||||
path_put(&path);
|
||||
if (retry_estale(error, lookup_flags)) {
|
||||
lookup_flags |= LOOKUP_REVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue