vfs: check i_nlink limits in vfs_{mkdir,rename_dir,link}
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 6 Feb 2012 17:45:27 +0000 (12:45 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 21 Mar 2012 01:29:32 +0000 (21:29 -0400)
commit8de52778798fe39660a8d6b26f290e0c93202761
tree56384beb7863c1f338f2b66b509bf58eea5a99c2
parentc16fa4f2ad19908a47c63d8fa436a1178438c7e7
vfs: check i_nlink limits in vfs_{mkdir,rename_dir,link}

New field of struct super_block - ->s_max_links.  Maximal allowed
value of ->i_nlink or 0; in the latter case all checks still need
to be done in ->link/->mkdir/->rename instances.  Note that this
limit applies both to directoris and to non-directories.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
26 files changed:
fs/exofs/namei.c
fs/exofs/super.c
fs/ext2/namei.c
fs/ext2/super.c
fs/jfs/namei.c
fs/jfs/super.c
fs/logfs/dir.c
fs/logfs/super.c
fs/minix/inode.c
fs/minix/minix.h
fs/minix/namei.c
fs/namei.c
fs/nilfs2/namei.c
fs/nilfs2/super.c
fs/sysv/namei.c
fs/sysv/super.c
fs/sysv/sysv.h
fs/udf/namei.c
fs/udf/super.c
fs/ufs/namei.c
fs/ufs/super.c
fs/xfs/xfs_rename.c
fs/xfs/xfs_super.c
fs/xfs/xfs_utils.c
fs/xfs/xfs_vnodeops.c
include/linux/fs.h