Commit b3aea4ed authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Tim Shimmin
Browse files

[XFS] kill the v_flag member in struct bhv_vnode



All flags previously handled at the vnode level are not in the xfs_inode
where we already have a flags mechanisms and free bits for flags
previously in the vnode.

SGI-PV: 969608
SGI-Modid: xfs-linux-melb:xfs-kern:29495a

Signed-off-by: default avatarChristoph Hellwig <hch@infradead.org>
Signed-off-by: default avatarDavid Chinner <dgc@sgi.com>
Signed-off-by: default avatarTim Shimmin <tes@sgi.com>
parent 2f6f7b3d
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -304,13 +304,13 @@ xfs_map_blocks(
	xfs_iomap_t		*mapp,
	int			flags)
{
	bhv_vnode_t		*vp = vn_from_inode(inode);
	xfs_inode_t		*ip = XFS_I(inode);
	int			error, nmaps = 1;

	error = xfs_bmap(xfs_vtoi(vp), offset, count,
	error = xfs_bmap(ip, offset, count,
				flags, mapp, &nmaps);
	if (!error && (flags & (BMAPI_WRITE|BMAPI_ALLOCATE)))
		VMODIFY(vp);
		xfs_iflags_set(ip, XFS_IMODIFIED);
	return -error;
}

@@ -1246,10 +1246,7 @@ xfs_vm_writepages(
	struct address_space	*mapping,
	struct writeback_control *wbc)
{
	struct bhv_vnode	*vp = vn_from_inode(mapping->host);

	if (VN_TRUNC(vp))
		VUNTRUNCATE(vp);
	xfs_iflags_clear(XFS_I(mapping->host), XFS_ITRUNCATED);
	return generic_writepages(mapping, wbc);
}

+3 −7
Original line number Diff line number Diff line
@@ -193,13 +193,11 @@ xfs_file_fsync(
	struct dentry	*dentry,
	int		datasync)
{
	bhv_vnode_t	*vp = vn_from_inode(dentry->d_inode);
	int		flags = FSYNC_WAIT;

	if (datasync)
		flags |= FSYNC_DATA;
	if (VN_TRUNC(vp))
		VUNTRUNCATE(vp);
	xfs_iflags_clear(XFS_I(dentry->d_inode), XFS_ITRUNCATED);
	return -xfs_fsync(XFS_I(dentry->d_inode), flags,
			(xfs_off_t)0, (xfs_off_t)-1);
}
@@ -277,10 +275,9 @@ xfs_file_ioctl(
{
	int		error;
	struct inode	*inode = filp->f_path.dentry->d_inode;
	bhv_vnode_t	*vp = vn_from_inode(inode);

	error = xfs_ioctl(XFS_I(inode), filp, 0, cmd, (void __user *)p);
	VMODIFY(vp);
	xfs_iflags_set(XFS_I(inode), XFS_IMODIFIED);

	/* NOTE:  some of the ioctl's return positive #'s as a
	 *	  byte count indicating success, such as
@@ -299,10 +296,9 @@ xfs_file_ioctl_invis(
{
	int		error;
	struct inode	*inode = filp->f_path.dentry->d_inode;
	bhv_vnode_t	*vp = vn_from_inode(inode);

	error = xfs_ioctl(XFS_I(inode), filp, IO_INVIS, cmd, (void __user *)p);
	VMODIFY(vp);
	xfs_iflags_set(XFS_I(inode), XFS_IMODIFIED);

	/* NOTE:  some of the ioctl's return positive #'s as a
	 *	  byte count indicating success, such as
+2 −4
Original line number Diff line number Diff line
@@ -61,8 +61,7 @@ xfs_flushinval_pages(
	int		ret = 0;

	if (VN_CACHED(vp)) {
		if (VN_TRUNC(vp))
			VUNTRUNCATE(vp);
		xfs_iflags_clear(ip, XFS_ITRUNCATED);
		ret = filemap_write_and_wait(inode->i_mapping);
		if (!ret)
			truncate_inode_pages(inode->i_mapping, first);
@@ -84,8 +83,7 @@ xfs_flush_pages(
	int		ret2;

	if (VN_DIRTY(vp)) {
		if (VN_TRUNC(vp))
			VUNTRUNCATE(vp);
		xfs_iflags_clear(ip, XFS_ITRUNCATED);
		ret = filemap_fdatawrite(inode->i_mapping);
		if (flags & XFS_B_ASYNC)
			return ret;
+1 −2
Original line number Diff line number Diff line
@@ -371,7 +371,6 @@ xfs_compat_ioctl(
	unsigned long	arg)
{
	struct inode	*inode = file->f_path.dentry->d_inode;
	bhv_vnode_t	*vp = vn_from_inode(inode);
	int		error;

	switch (cmd) {
@@ -459,7 +458,7 @@ xfs_compat_ioctl(
	}

	error = xfs_ioctl(XFS_I(inode), file, mode, cmd, (void __user *)arg);
	VMODIFY(vp);
	xfs_iflags_set(XFS_I(inode), XFS_IMODIFIED);

	return error;
}
+3 −3
Original line number Diff line number Diff line
@@ -221,7 +221,7 @@ xfs_init_security(
	error = xfs_attr_set(XFS_I(ip), name, value,
			length, ATTR_SECURE);
	if (!error)
		VMODIFY(vp);
		xfs_iflags_set(XFS_I(ip), XFS_IMODIFIED);

	kfree(name);
	kfree(value);
@@ -327,7 +327,7 @@ xfs_vn_mknod(
		if (!error) {
			error = _ACL_INHERIT(vp, &vattr, default_acl);
			if (!error)
				VMODIFY(vp);
				xfs_iflags_set(XFS_I(&vp->v_inode), XFS_IMODIFIED);
			else
				xfs_cleanup_inode(dir, vp, dentry, mode);
		}
@@ -409,7 +409,7 @@ xfs_vn_link(
	if (unlikely(error)) {
		VN_RELE(vp);
	} else {
		VMODIFY(vn_from_inode(dir));
		xfs_iflags_set(XFS_I(dir), XFS_IMODIFIED);
		xfs_validate_fields(ip, &vattr);
		d_instantiate(dentry, ip);
	}
Loading