• Eric W. Biederman's avatar
    sysfs: Kill nlink counting. · 524b6c5b
    Eric W. Biederman authored
    Tracking the number of subdirectories requires an extra field that increases
    the size of sysfs_dirent.  nlinks are not particularly interesting for sysfs
    and the nlink counts are wrong when network namespaces are involved so stop
    counting them, and always return nlink == 1.  Userspace already knows that
    directories with nlink == 1 have an nlink count they can't use to count
    subdirectories.
    
    This reduces the size of sysfs_dirent by 8 bytes on 64bit platforms.
    Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    524b6c5b
dir.c 24.2 KB