]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/xfs/xfs_ioctl.c
Merge uncontroversial parts of branch 'readlink' of git://git.kernel.org/pub/scm...
[karo-tx-linux.git] / fs / xfs / xfs_ioctl.c
index c245bed3249bf1a192f430c7b7c781e84baf93e3..c67cfb451fd3a74dad2d365e372b4e5fa296eecd 100644 (file)
@@ -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;
        }