提交 e678fb0d 编写于 作者: J Josef "Jeff" Sipek 提交者: Linus Torvalds

[PATCH] xfs: change uses of f_{dentry,vfsmnt} to use f_path

Change all the uses of f_{dentry,vfsmnt} to f_path.{dentry,mnt} in the xfs
filesystem.
Signed-off-by: NJosef "Jeff" Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 bd243a4b
...@@ -55,7 +55,7 @@ __xfs_file_read( ...@@ -55,7 +55,7 @@ __xfs_file_read(
loff_t pos) loff_t pos)
{ {
struct file *file = iocb->ki_filp; struct file *file = iocb->ki_filp;
bhv_vnode_t *vp = vn_from_inode(file->f_dentry->d_inode); bhv_vnode_t *vp = vn_from_inode(file->f_path.dentry->d_inode);
BUG_ON(iocb->ki_pos != pos); BUG_ON(iocb->ki_pos != pos);
if (unlikely(file->f_flags & O_DIRECT)) if (unlikely(file->f_flags & O_DIRECT))
...@@ -131,7 +131,7 @@ xfs_file_sendfile( ...@@ -131,7 +131,7 @@ xfs_file_sendfile(
read_actor_t actor, read_actor_t actor,
void *target) void *target)
{ {
return bhv_vop_sendfile(vn_from_inode(filp->f_dentry->d_inode), return bhv_vop_sendfile(vn_from_inode(filp->f_path.dentry->d_inode),
filp, pos, 0, count, actor, target, NULL); filp, pos, 0, count, actor, target, NULL);
} }
...@@ -143,7 +143,7 @@ xfs_file_sendfile_invis( ...@@ -143,7 +143,7 @@ xfs_file_sendfile_invis(
read_actor_t actor, read_actor_t actor,
void *target) void *target)
{ {
return bhv_vop_sendfile(vn_from_inode(filp->f_dentry->d_inode), return bhv_vop_sendfile(vn_from_inode(filp->f_path.dentry->d_inode),
filp, pos, IO_INVIS, count, actor, target, NULL); filp, pos, IO_INVIS, count, actor, target, NULL);
} }
...@@ -155,7 +155,7 @@ xfs_file_splice_read( ...@@ -155,7 +155,7 @@ xfs_file_splice_read(
size_t len, size_t len,
unsigned int flags) unsigned int flags)
{ {
return bhv_vop_splice_read(vn_from_inode(infilp->f_dentry->d_inode), return bhv_vop_splice_read(vn_from_inode(infilp->f_path.dentry->d_inode),
infilp, ppos, pipe, len, flags, 0, NULL); infilp, ppos, pipe, len, flags, 0, NULL);
} }
...@@ -167,7 +167,7 @@ xfs_file_splice_read_invis( ...@@ -167,7 +167,7 @@ xfs_file_splice_read_invis(
size_t len, size_t len,
unsigned int flags) unsigned int flags)
{ {
return bhv_vop_splice_read(vn_from_inode(infilp->f_dentry->d_inode), return bhv_vop_splice_read(vn_from_inode(infilp->f_path.dentry->d_inode),
infilp, ppos, pipe, len, flags, IO_INVIS, infilp, ppos, pipe, len, flags, IO_INVIS,
NULL); NULL);
} }
...@@ -180,7 +180,7 @@ xfs_file_splice_write( ...@@ -180,7 +180,7 @@ xfs_file_splice_write(
size_t len, size_t len,
unsigned int flags) unsigned int flags)
{ {
return bhv_vop_splice_write(vn_from_inode(outfilp->f_dentry->d_inode), return bhv_vop_splice_write(vn_from_inode(outfilp->f_path.dentry->d_inode),
pipe, outfilp, ppos, len, flags, 0, NULL); pipe, outfilp, ppos, len, flags, 0, NULL);
} }
...@@ -192,7 +192,7 @@ xfs_file_splice_write_invis( ...@@ -192,7 +192,7 @@ xfs_file_splice_write_invis(
size_t len, size_t len,
unsigned int flags) unsigned int flags)
{ {
return bhv_vop_splice_write(vn_from_inode(outfilp->f_dentry->d_inode), return bhv_vop_splice_write(vn_from_inode(outfilp->f_path.dentry->d_inode),
pipe, outfilp, ppos, len, flags, IO_INVIS, pipe, outfilp, ppos, len, flags, IO_INVIS,
NULL); NULL);
} }
...@@ -212,7 +212,7 @@ xfs_file_close( ...@@ -212,7 +212,7 @@ xfs_file_close(
struct file *filp, struct file *filp,
fl_owner_t id) fl_owner_t id)
{ {
return -bhv_vop_close(vn_from_inode(filp->f_dentry->d_inode), 0, return -bhv_vop_close(vn_from_inode(filp->f_path.dentry->d_inode), 0,
file_count(filp) > 1 ? L_FALSE : L_TRUE, NULL); file_count(filp) > 1 ? L_FALSE : L_TRUE, NULL);
} }
...@@ -251,7 +251,7 @@ xfs_vm_nopage( ...@@ -251,7 +251,7 @@ xfs_vm_nopage(
unsigned long address, unsigned long address,
int *type) int *type)
{ {
struct inode *inode = area->vm_file->f_dentry->d_inode; struct inode *inode = area->vm_file->f_path.dentry->d_inode;
bhv_vnode_t *vp = vn_from_inode(inode); bhv_vnode_t *vp = vn_from_inode(inode);
ASSERT_ALWAYS(vp->v_vfsp->vfs_flag & VFS_DMI); ASSERT_ALWAYS(vp->v_vfsp->vfs_flag & VFS_DMI);
...@@ -268,7 +268,7 @@ xfs_file_readdir( ...@@ -268,7 +268,7 @@ xfs_file_readdir(
filldir_t filldir) filldir_t filldir)
{ {
int error = 0; int error = 0;
bhv_vnode_t *vp = vn_from_inode(filp->f_dentry->d_inode); bhv_vnode_t *vp = vn_from_inode(filp->f_path.dentry->d_inode);
uio_t uio; uio_t uio;
iovec_t iov; iovec_t iov;
int eof = 0; int eof = 0;
...@@ -345,7 +345,7 @@ xfs_file_mmap( ...@@ -345,7 +345,7 @@ xfs_file_mmap(
vma->vm_ops = &xfs_file_vm_ops; vma->vm_ops = &xfs_file_vm_ops;
#ifdef CONFIG_XFS_DMAPI #ifdef CONFIG_XFS_DMAPI
if (vn_from_inode(filp->f_dentry->d_inode)->v_vfsp->vfs_flag & VFS_DMI) if (vn_from_inode(filp->f_path.dentry->d_inode)->v_vfsp->vfs_flag & VFS_DMI)
vma->vm_ops = &xfs_dmapi_file_vm_ops; vma->vm_ops = &xfs_dmapi_file_vm_ops;
#endif /* CONFIG_XFS_DMAPI */ #endif /* CONFIG_XFS_DMAPI */
...@@ -360,7 +360,7 @@ xfs_file_ioctl( ...@@ -360,7 +360,7 @@ xfs_file_ioctl(
unsigned long p) unsigned long p)
{ {
int error; int error;
struct inode *inode = filp->f_dentry->d_inode; struct inode *inode = filp->f_path.dentry->d_inode;
bhv_vnode_t *vp = vn_from_inode(inode); bhv_vnode_t *vp = vn_from_inode(inode);
error = bhv_vop_ioctl(vp, inode, filp, 0, cmd, (void __user *)p); error = bhv_vop_ioctl(vp, inode, filp, 0, cmd, (void __user *)p);
...@@ -382,7 +382,7 @@ xfs_file_ioctl_invis( ...@@ -382,7 +382,7 @@ xfs_file_ioctl_invis(
unsigned long p) unsigned long p)
{ {
int error; int error;
struct inode *inode = filp->f_dentry->d_inode; struct inode *inode = filp->f_path.dentry->d_inode;
bhv_vnode_t *vp = vn_from_inode(inode); bhv_vnode_t *vp = vn_from_inode(inode);
error = bhv_vop_ioctl(vp, inode, filp, IO_INVIS, cmd, (void __user *)p); error = bhv_vop_ioctl(vp, inode, filp, IO_INVIS, cmd, (void __user *)p);
...@@ -404,7 +404,7 @@ xfs_vm_mprotect( ...@@ -404,7 +404,7 @@ xfs_vm_mprotect(
struct vm_area_struct *vma, struct vm_area_struct *vma,
unsigned int newflags) unsigned int newflags)
{ {
bhv_vnode_t *vp = vn_from_inode(vma->vm_file->f_dentry->d_inode); bhv_vnode_t *vp = vn_from_inode(vma->vm_file->f_path.dentry->d_inode);
int error = 0; int error = 0;
if (vp->v_vfsp->vfs_flag & VFS_DMI) { if (vp->v_vfsp->vfs_flag & VFS_DMI) {
......
...@@ -107,9 +107,9 @@ xfs_find_handle( ...@@ -107,9 +107,9 @@ xfs_find_handle(
if (!file) if (!file)
return -EBADF; return -EBADF;
ASSERT(file->f_dentry); ASSERT(file->f_path.dentry);
ASSERT(file->f_dentry->d_inode); ASSERT(file->f_path.dentry->d_inode);
inode = igrab(file->f_dentry->d_inode); inode = igrab(file->f_path.dentry->d_inode);
fput(file); fput(file);
break; break;
} }
...@@ -333,10 +333,10 @@ xfs_open_by_handle( ...@@ -333,10 +333,10 @@ xfs_open_by_handle(
} }
/* Ensure umount returns EBUSY on umounts while this file is open. */ /* Ensure umount returns EBUSY on umounts while this file is open. */
mntget(parfilp->f_vfsmnt); mntget(parfilp->f_path.mnt);
/* Create file pointer. */ /* Create file pointer. */
filp = dentry_open(dentry, parfilp->f_vfsmnt, hreq.oflags); filp = dentry_open(dentry, parfilp->f_path.mnt, hreq.oflags);
if (IS_ERR(filp)) { if (IS_ERR(filp)) {
put_unused_fd(new_fd); put_unused_fd(new_fd);
return -XFS_ERROR(-PTR_ERR(filp)); return -XFS_ERROR(-PTR_ERR(filp));
......
...@@ -112,7 +112,7 @@ xfs_compat_ioctl( ...@@ -112,7 +112,7 @@ xfs_compat_ioctl(
unsigned cmd, unsigned cmd,
unsigned long arg) unsigned long arg)
{ {
struct inode *inode = file->f_dentry->d_inode; struct inode *inode = file->f_path.dentry->d_inode;
bhv_vnode_t *vp = vn_from_inode(inode); bhv_vnode_t *vp = vn_from_inode(inode);
int error; int error;
......
...@@ -805,7 +805,7 @@ xfs_write( ...@@ -805,7 +805,7 @@ xfs_write(
!capable(CAP_FSETID)) { !capable(CAP_FSETID)) {
error = xfs_write_clear_setuid(xip); error = xfs_write_clear_setuid(xip);
if (likely(!error)) if (likely(!error))
error = -remove_suid(file->f_dentry); error = -remove_suid(file->f_path.dentry);
if (unlikely(error)) { if (unlikely(error)) {
xfs_iunlock(xip, iolock); xfs_iunlock(xip, iolock);
goto out_unlock_mutex; goto out_unlock_mutex;
......
...@@ -71,7 +71,7 @@ xfs_swapext( ...@@ -71,7 +71,7 @@ xfs_swapext(
/* Pull information for the target fd */ /* Pull information for the target fd */
if (((fp = fget((int)sxp->sx_fdtarget)) == NULL) || if (((fp = fget((int)sxp->sx_fdtarget)) == NULL) ||
((vp = vn_from_inode(fp->f_dentry->d_inode)) == NULL)) { ((vp = vn_from_inode(fp->f_path.dentry->d_inode)) == NULL)) {
error = XFS_ERROR(EINVAL); error = XFS_ERROR(EINVAL);
goto error0; goto error0;
} }
...@@ -83,7 +83,7 @@ xfs_swapext( ...@@ -83,7 +83,7 @@ xfs_swapext(
} }
if (((tfp = fget((int)sxp->sx_fdtmp)) == NULL) || if (((tfp = fget((int)sxp->sx_fdtmp)) == NULL) ||
((tvp = vn_from_inode(tfp->f_dentry->d_inode)) == NULL)) { ((tvp = vn_from_inode(tfp->f_path.dentry->d_inode)) == NULL)) {
error = XFS_ERROR(EINVAL); error = XFS_ERROR(EINVAL);
goto error0; goto error0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册