]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
xfs: allow reading of already-locked remote symbolic link
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 16 Jun 2017 18:00:15 +0000 (11:00 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 20 Jun 2017 17:45:22 +0000 (10:45 -0700)
Expose the readlink variant that doesn't take the inode lock so that
the scrubber can inspect symlink contents.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/xfs_symlink.c
fs/xfs/xfs_symlink.h

index f2cb45ed1d54c3507ceb365a243e105f2e20e7fb..493804857d67a54facfcaedbbfcd4a7432237959 100644 (file)
@@ -43,8 +43,8 @@
 #include "xfs_log.h"
 
 /* ----- Kernel only functions below ----- */
-STATIC int
-xfs_readlink_bmap(
+int
+xfs_readlink_bmap_ilocked(
        struct xfs_inode        *ip,
        char                    *link)
 {
@@ -153,7 +153,7 @@ xfs_readlink(
        }
 
 
-       error = xfs_readlink_bmap(ip, link);
+       error = xfs_readlink_bmap_ilocked(ip, link);
 
  out:
        xfs_iunlock(ip, XFS_ILOCK_SHARED);
index e75245d0911611aeca2e78dfeae633c03bd34c3e..aeaee89236171e7c421276205f3fd2771b7faa82 100644 (file)
@@ -21,6 +21,7 @@
 
 int xfs_symlink(struct xfs_inode *dp, struct xfs_name *link_name,
                const char *target_path, umode_t mode, struct xfs_inode **ipp);
+int xfs_readlink_bmap_ilocked(struct xfs_inode *ip, char *link);
 int xfs_readlink(struct xfs_inode *ip, char *link);
 int xfs_inactive_symlink(struct xfs_inode *ip);