xfs_symlink.c (9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e) | xfs_symlink.c (d9041681dd2f5334529a68868c9266631c384de4) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (c) 2000-2006 Silicon Graphics, Inc. 4 * Copyright (c) 2012-2013 Red Hat, Inc. 5 * All rights reserved. 6 */ 7#include "xfs.h" 8#include "xfs_shared.h" --- 9 unchanged lines hidden (view full) --- 18#include "xfs_bmap_btree.h" 19#include "xfs_quota.h" 20#include "xfs_symlink.h" 21#include "xfs_trans_space.h" 22#include "xfs_trace.h" 23#include "xfs_trans.h" 24#include "xfs_ialloc.h" 25#include "xfs_error.h" | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (c) 2000-2006 Silicon Graphics, Inc. 4 * Copyright (c) 2012-2013 Red Hat, Inc. 5 * All rights reserved. 6 */ 7#include "xfs.h" 8#include "xfs_shared.h" --- 9 unchanged lines hidden (view full) --- 18#include "xfs_bmap_btree.h" 19#include "xfs_quota.h" 20#include "xfs_symlink.h" 21#include "xfs_trans_space.h" 22#include "xfs_trace.h" 23#include "xfs_trans.h" 24#include "xfs_ialloc.h" 25#include "xfs_error.h" |
26#include "xfs_health.h" |
|
26 27/* ----- Kernel only functions below ----- */ 28int 29xfs_readlink_bmap_ilocked( 30 struct xfs_inode *ip, 31 char *link) 32{ 33 struct xfs_mount *mp = ip->i_mount; --- 69 unchanged lines hidden (view full) --- 103 struct xfs_mount *mp = ip->i_mount; 104 xfs_fsize_t pathlen; 105 int error = -EFSCORRUPTED; 106 107 trace_xfs_readlink(ip); 108 109 if (xfs_is_shutdown(mp)) 110 return -EIO; | 27 28/* ----- Kernel only functions below ----- */ 29int 30xfs_readlink_bmap_ilocked( 31 struct xfs_inode *ip, 32 char *link) 33{ 34 struct xfs_mount *mp = ip->i_mount; --- 69 unchanged lines hidden (view full) --- 104 struct xfs_mount *mp = ip->i_mount; 105 xfs_fsize_t pathlen; 106 int error = -EFSCORRUPTED; 107 108 trace_xfs_readlink(ip); 109 110 if (xfs_is_shutdown(mp)) 111 return -EIO; |
112 if (xfs_ifork_zapped(ip, XFS_DATA_FORK)) 113 return -EIO; |
|
111 112 xfs_ilock(ip, XFS_ILOCK_SHARED); 113 114 pathlen = ip->i_disk_size; 115 if (!pathlen) 116 goto out; 117 118 if (pathlen < 0 || pathlen > XFS_SYMLINK_MAXLEN) { --- 394 unchanged lines hidden --- | 114 115 xfs_ilock(ip, XFS_ILOCK_SHARED); 116 117 pathlen = ip->i_disk_size; 118 if (!pathlen) 119 goto out; 120 121 if (pathlen < 0 || pathlen > XFS_SYMLINK_MAXLEN) { --- 394 unchanged lines hidden --- |