Commit 5da8f2f8 authored by Darrick J. Wong's avatar Darrick J. Wong

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: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
parent ad017f65
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
#include "xfs_log.h" #include "xfs_log.h"
/* ----- Kernel only functions below ----- */ /* ----- Kernel only functions below ----- */
STATIC int int
xfs_readlink_bmap( xfs_readlink_bmap_ilocked(
struct xfs_inode *ip, struct xfs_inode *ip,
char *link) char *link)
{ {
...@@ -153,7 +153,7 @@ xfs_readlink( ...@@ -153,7 +153,7 @@ xfs_readlink(
} }
error = xfs_readlink_bmap(ip, link); error = xfs_readlink_bmap_ilocked(ip, link);
out: out:
xfs_iunlock(ip, XFS_ILOCK_SHARED); xfs_iunlock(ip, XFS_ILOCK_SHARED);
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
int xfs_symlink(struct xfs_inode *dp, struct xfs_name *link_name, int xfs_symlink(struct xfs_inode *dp, struct xfs_name *link_name,
const char *target_path, umode_t mode, struct xfs_inode **ipp); 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_readlink(struct xfs_inode *ip, char *link);
int xfs_inactive_symlink(struct xfs_inode *ip); int xfs_inactive_symlink(struct xfs_inode *ip);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment