xfs: allow reading of already-locked remote symbolic link

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>
This commit is contained in:
Darrick J. Wong
2017-06-16 11:00:15 -07:00
parent ad017f6537
commit 5da8f2f890
2 changed files with 4 additions and 3 deletions

View 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);