diff options
Diffstat (limited to 'fs/xfs/xfs_ioctl.c')
| -rw-r--r-- | fs/xfs/xfs_ioctl.c | 12 | 
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index c245bed3249b..c67cfb451fd3 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -287,7 +287,7 @@ xfs_readlink_by_handle(  		return PTR_ERR(dentry);  	/* Restrict this handle operation to symlinks only. */ -	if (!d_inode(dentry)->i_op->readlink) { +	if (!d_is_symlink(dentry)) {  		error = -EINVAL;  		goto out_dput;  	} @@ -297,7 +297,7 @@ xfs_readlink_by_handle(  		goto out_dput;  	} -	error = d_inode(dentry)->i_op->readlink(dentry, hreq->ohandle, olen); +	error = vfs_readlink(dentry, hreq->ohandle, olen);   out_dput:  	dput(dentry); @@ -639,7 +639,7 @@ xfs_ioc_space(  		return error;  	xfs_ilock(ip, iolock); -	error = xfs_break_layouts(inode, &iolock, false); +	error = xfs_break_layouts(inode, &iolock);  	if (error)  		goto out_unlock; @@ -910,16 +910,14 @@ xfs_ioc_fsgetxattr(  	if (attr) {  		if (ip->i_afp) {  			if (ip->i_afp->if_flags & XFS_IFEXTENTS) -				fa.fsx_nextents = ip->i_afp->if_bytes / -							sizeof(xfs_bmbt_rec_t); +				fa.fsx_nextents = xfs_iext_count(ip->i_afp);  			else  				fa.fsx_nextents = ip->i_d.di_anextents;  		} else  			fa.fsx_nextents = 0;  	} else {  		if (ip->i_df.if_flags & XFS_IFEXTENTS) -			fa.fsx_nextents = ip->i_df.if_bytes / -						sizeof(xfs_bmbt_rec_t); +			fa.fsx_nextents = xfs_iext_count(&ip->i_df);  		else  			fa.fsx_nextents = ip->i_d.di_nextents;  	}  |