Skip to content

Commit 5da8f2f

Browse files
committed
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 <[email protected]> Reviewed-by: Brian Foster <[email protected]>
1 parent ad017f6 commit 5da8f2f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

fs/xfs/xfs_symlink.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
#include "xfs_log.h"
4444

4545
/* ----- Kernel only functions below ----- */
46-
STATIC int
47-
xfs_readlink_bmap(
46+
int
47+
xfs_readlink_bmap_ilocked(
4848
struct xfs_inode *ip,
4949
char *link)
5050
{
@@ -153,7 +153,7 @@ xfs_readlink(
153153
}
154154

155155

156-
error = xfs_readlink_bmap(ip, link);
156+
error = xfs_readlink_bmap_ilocked(ip, link);
157157

158158
out:
159159
xfs_iunlock(ip, XFS_ILOCK_SHARED);

fs/xfs/xfs_symlink.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
int xfs_symlink(struct xfs_inode *dp, struct xfs_name *link_name,
2323
const char *target_path, umode_t mode, struct xfs_inode **ipp);
24+
int xfs_readlink_bmap_ilocked(struct xfs_inode *ip, char *link);
2425
int xfs_readlink(struct xfs_inode *ip, char *link);
2526
int xfs_inactive_symlink(struct xfs_inode *ip);
2627

0 commit comments

Comments
 (0)