forked from Minki/linux
[XFS] Kill shouty XFS_ITOV() macro
Replace XFS_ITOV() with the new VFS_I() inline. SGI-PV: 981498 SGI-Modid: xfs-linux-melb:xfs-kern:31724a Signed-off-by: David Chinner <david@fromorbit.com> Signed-off-by: Niv Sardi <xaiki@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
This commit is contained in:
parent
705db4a24e
commit
e4f7529108
@ -245,7 +245,7 @@ xfs_vget_fsop_handlereq(
|
||||
|
||||
xfs_iunlock(ip, XFS_ILOCK_SHARED);
|
||||
|
||||
*inode = XFS_ITOV(ip);
|
||||
*inode = VFS_I(ip);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -927,7 +927,7 @@ STATIC void
|
||||
xfs_diflags_to_linux(
|
||||
struct xfs_inode *ip)
|
||||
{
|
||||
struct inode *inode = XFS_ITOV(ip);
|
||||
struct inode *inode = VFS_I(ip);
|
||||
unsigned int xflags = xfs_ip2xflags(ip);
|
||||
|
||||
if (xflags & XFS_XFLAG_IMMUTABLE)
|
||||
|
@ -101,7 +101,7 @@ xfs_ichgtime(
|
||||
xfs_inode_t *ip,
|
||||
int flags)
|
||||
{
|
||||
struct inode *inode = vn_to_inode(XFS_ITOV(ip));
|
||||
struct inode *inode = VFS_I(ip);
|
||||
timespec_t tv;
|
||||
|
||||
nanotime(&tv);
|
||||
|
@ -180,7 +180,7 @@
|
||||
#define xfs_sort(a,n,s,fn) sort(a,n,s,fn,NULL)
|
||||
#define xfs_stack_trace() dump_stack()
|
||||
#define xfs_itruncate_data(ip, off) \
|
||||
(-vmtruncate(vn_to_inode(XFS_ITOV(ip)), (off)))
|
||||
(-vmtruncate(vn_to_inode(VFS_I(ip)), (off)))
|
||||
|
||||
|
||||
/* Move the kernel do_div definition off to one side */
|
||||
|
@ -1131,7 +1131,7 @@ void
|
||||
xfs_flush_device(
|
||||
xfs_inode_t *ip)
|
||||
{
|
||||
struct inode *inode = vn_to_inode(XFS_ITOV(ip));
|
||||
struct inode *inode = VFS_I(ip);
|
||||
|
||||
igrab(inode);
|
||||
xfs_syncd_queue_work(ip->i_mount, inode, xfs_flush_device_work);
|
||||
|
@ -431,7 +431,7 @@ xfs_qm_dqalloc(
|
||||
* when it unlocks the inode. Since we want to keep the quota
|
||||
* inode around, we bump the vnode ref count now.
|
||||
*/
|
||||
VN_HOLD(XFS_ITOV(quotip));
|
||||
VN_HOLD(VFS_I(quotip));
|
||||
|
||||
xfs_trans_ijoin(tp, quotip, XFS_ILOCK_EXCL);
|
||||
nmaps = 1;
|
||||
|
@ -4000,7 +4000,7 @@ xfs_bmap_add_attrfork(
|
||||
ip->i_d.di_aformat = XFS_DINODE_FMT_EXTENTS;
|
||||
}
|
||||
ASSERT(ip->i_d.di_anextents == 0);
|
||||
VN_HOLD(XFS_ITOV(ip));
|
||||
VN_HOLD(VFS_I(ip));
|
||||
xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
|
||||
xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
|
||||
switch (ip->i_d.di_format) {
|
||||
|
@ -150,8 +150,8 @@ xfs_swap_extents(
|
||||
}
|
||||
|
||||
sbp = &sxp->sx_stat;
|
||||
vp = XFS_ITOV(ip);
|
||||
tvp = XFS_ITOV(tip);
|
||||
vp = VFS_I(ip);
|
||||
tvp = VFS_I(tip);
|
||||
|
||||
/* Lock in i_ino order */
|
||||
if (ip->i_ino < tip->i_ino) {
|
||||
|
@ -1408,7 +1408,7 @@ xfs_itruncate_start(
|
||||
(flags == XFS_ITRUNC_MAYBE));
|
||||
|
||||
mp = ip->i_mount;
|
||||
vp = XFS_ITOV(ip);
|
||||
vp = VFS_I(ip);
|
||||
|
||||
/* wait for the completion of any pending DIOs */
|
||||
if (new_size < ip->i_size)
|
||||
|
@ -279,7 +279,6 @@ static inline struct inode *VFS_I(struct xfs_inode *ip)
|
||||
{
|
||||
return (struct inode *)ip->i_vnode;
|
||||
}
|
||||
#define XFS_ITOV(ip) VFS_I(ip)
|
||||
|
||||
/*
|
||||
* i_flags helper functions
|
||||
|
@ -72,7 +72,7 @@ xfs_bulkstat_one_iget(
|
||||
ASSERT(ip != NULL);
|
||||
ASSERT(ip->i_blkno != (xfs_daddr_t)0);
|
||||
|
||||
vp = XFS_ITOV(ip);
|
||||
vp = VFS_I(ip);
|
||||
dic = &ip->i_d;
|
||||
|
||||
/* xfs_iget returns the following without needing
|
||||
|
@ -18,8 +18,8 @@
|
||||
#ifndef __XFS_UTILS_H__
|
||||
#define __XFS_UTILS_H__
|
||||
|
||||
#define IRELE(ip) VN_RELE(XFS_ITOV(ip))
|
||||
#define IHOLD(ip) VN_HOLD(XFS_ITOV(ip))
|
||||
#define IRELE(ip) VN_RELE(VFS_I(ip))
|
||||
#define IHOLD(ip) VN_HOLD(VFS_I(ip))
|
||||
|
||||
extern int xfs_truncate_file(xfs_mount_t *, xfs_inode_t *);
|
||||
extern int xfs_dir_ialloc(xfs_trans_t **, xfs_inode_t *, mode_t, xfs_nlink_t,
|
||||
|
@ -128,7 +128,7 @@ xfs_unmount_flush(
|
||||
xfs_inode_t *rip = mp->m_rootip;
|
||||
xfs_inode_t *rbmip;
|
||||
xfs_inode_t *rsumip = NULL;
|
||||
bhv_vnode_t *rvp = XFS_ITOV(rip);
|
||||
bhv_vnode_t *rvp = VFS_I(rip);
|
||||
int error;
|
||||
|
||||
xfs_ilock(rip, XFS_ILOCK_EXCL | XFS_ILOCK_PARENT);
|
||||
@ -146,7 +146,7 @@ xfs_unmount_flush(
|
||||
if (error == EFSCORRUPTED)
|
||||
goto fscorrupt_out;
|
||||
|
||||
ASSERT(vn_count(XFS_ITOV(rbmip)) == 1);
|
||||
ASSERT(vn_count(VFS_I(rbmip)) == 1);
|
||||
|
||||
rsumip = mp->m_rsumip;
|
||||
xfs_ilock(rsumip, XFS_ILOCK_EXCL);
|
||||
@ -157,7 +157,7 @@ xfs_unmount_flush(
|
||||
if (error == EFSCORRUPTED)
|
||||
goto fscorrupt_out;
|
||||
|
||||
ASSERT(vn_count(XFS_ITOV(rsumip)) == 1);
|
||||
ASSERT(vn_count(VFS_I(rsumip)) == 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -479,7 +479,7 @@ xfs_sync_inodes(
|
||||
IPOINTER_INSERT(ip, mp);
|
||||
xfs_ilock(ip, lock_flags);
|
||||
|
||||
ASSERT(vp == XFS_ITOV(ip));
|
||||
ASSERT(vp == VFS_I(ip));
|
||||
ASSERT(ip->i_mount == mp);
|
||||
|
||||
vnode_refed = B_TRUE;
|
||||
|
@ -83,7 +83,7 @@ xfs_setattr(
|
||||
cred_t *credp)
|
||||
{
|
||||
xfs_mount_t *mp = ip->i_mount;
|
||||
struct inode *inode = XFS_ITOV(ip);
|
||||
struct inode *inode = VFS_I(ip);
|
||||
int mask = iattr->ia_valid;
|
||||
xfs_trans_t *tp;
|
||||
int code;
|
||||
@ -714,7 +714,7 @@ xfs_fsync(
|
||||
return XFS_ERROR(EIO);
|
||||
|
||||
/* capture size updates in I/O completion before writing the inode. */
|
||||
error = filemap_fdatawait(vn_to_inode(XFS_ITOV(ip))->i_mapping);
|
||||
error = filemap_fdatawait(vn_to_inode(VFS_I(ip))->i_mapping);
|
||||
if (error)
|
||||
return XFS_ERROR(error);
|
||||
|
||||
@ -1160,7 +1160,7 @@ int
|
||||
xfs_release(
|
||||
xfs_inode_t *ip)
|
||||
{
|
||||
bhv_vnode_t *vp = XFS_ITOV(ip);
|
||||
bhv_vnode_t *vp = VFS_I(ip);
|
||||
xfs_mount_t *mp = ip->i_mount;
|
||||
int error;
|
||||
|
||||
@ -1227,7 +1227,7 @@ int
|
||||
xfs_inactive(
|
||||
xfs_inode_t *ip)
|
||||
{
|
||||
bhv_vnode_t *vp = XFS_ITOV(ip);
|
||||
bhv_vnode_t *vp = VFS_I(ip);
|
||||
xfs_bmap_free_t free_list;
|
||||
xfs_fsblock_t first_block;
|
||||
int committed;
|
||||
@ -2873,7 +2873,7 @@ int
|
||||
xfs_reclaim(
|
||||
xfs_inode_t *ip)
|
||||
{
|
||||
bhv_vnode_t *vp = XFS_ITOV(ip);
|
||||
bhv_vnode_t *vp = VFS_I(ip);
|
||||
|
||||
xfs_itrace_entry(ip);
|
||||
|
||||
@ -3341,7 +3341,7 @@ xfs_free_file_space(
|
||||
xfs_trans_t *tp;
|
||||
int need_iolock = 1;
|
||||
|
||||
vp = XFS_ITOV(ip);
|
||||
vp = VFS_I(ip);
|
||||
mp = ip->i_mount;
|
||||
|
||||
xfs_itrace_entry(ip);
|
||||
|
Loading…
Reference in New Issue
Block a user