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>
Esse commit está contido em:
@@ -754,6 +754,7 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent)
|
||||
sb->s_blocksize = EXOFS_BLKSIZE;
|
||||
sb->s_blocksize_bits = EXOFS_BLKSHIFT;
|
||||
sb->s_maxbytes = MAX_LFS_FILESIZE;
|
||||
sb->s_max_links = EXOFS_LINK_MAX;
|
||||
atomic_set(&sbi->s_curr_pending, 0);
|
||||
sb->s_bdev = NULL;
|
||||
sb->s_dev = 0;
|
||||
|
Referência em uma nova issue
Block a user