mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
xfs: rename MAXPATHLEN to XFS_SYMLINK_MAXLEN
XFS has a maximum symlink target length of 1024 bytes; this is a holdover from the Irix days. Unfortunately, the constant establishing this is 'MAXPATHLEN' and is /not/ the same as the Linux MAXPATHLEN, which is 4096. The kernel enforces its 1024 byte MAXPATHLEN on symlink targets, but xfsprogs picks up the (Linux) system 4096 byte MAXPATHLEN, which means that xfs_repair doesn't complain about oversized symlinks. Since this is an on-disk format constraint, put the define in the XFS namespace and move everything over to use the new name. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
This commit is contained in:
parent
2192b0baea
commit
6eb0b8df9f
6 changed files with 8 additions and 8 deletions
|
@ -460,7 +460,7 @@ xfs_vn_get_link(
|
|||
if (!dentry)
|
||||
return ERR_PTR(-ECHILD);
|
||||
|
||||
link = kmalloc(MAXPATHLEN+1, GFP_KERNEL);
|
||||
link = kmalloc(XFS_SYMLINK_MAXLEN+1, GFP_KERNEL);
|
||||
if (!link)
|
||||
goto out_err;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue