switch vfs_getattr() to struct path

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2013-01-24 02:18:08 -05:00
parent e72837e3e7
commit 3dadecce20
14 changed files with 40 additions and 35 deletions

View File

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