]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: rename MAXPATHLEN to XFS_SYMLINK_MAXLEN
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 7 Jul 2017 15:37:26 +0000 (08:37 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 7 Jul 2017 15:37:26 +0000 (08:37 -0700)
commit00053ad43dd9361edd7edbe251a8a78b464392bd
tree5e3d151e8403e117bd8207c36b6d1c2a3c8b0ca6
parent8de6499e0c0f557a67b615fdb9cbe5918d1bba9a
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>
fs/xfs/libxfs/xfs_format.h
fs/xfs/libxfs/xfs_symlink_remote.c
fs/xfs/libxfs/xfs_trans_resv.c
fs/xfs/xfs_iops.c
fs/xfs/xfs_linux.h
fs/xfs/xfs_symlink.c