mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 13:11:14 +00:00
fs: do not assign default i_ino in new_inode
Instead of always assigning an increasing inode number in new_inode move the call to assign it into those callers that actually need it. For now callers that need it is estimated conservatively, that is the call is added to all filesystems that do not assign an i_ino by themselves. For a few more filesystems we can avoid assigning any inode number given that they aren't user visible, and for others it could be done lazily when an inode number is actually needed, but that's left for later patches. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
f991bd2e14
commit
85fe4025c6
31 changed files with 36 additions and 2 deletions
|
@ -480,6 +480,7 @@ static struct socket *sock_alloc(void)
|
|||
sock = SOCKET_I(inode);
|
||||
|
||||
kmemcheck_annotate_bitfield(sock, type);
|
||||
inode->i_ino = get_next_ino();
|
||||
inode->i_mode = S_IFSOCK | S_IRWXUGO;
|
||||
inode->i_uid = current_fsuid();
|
||||
inode->i_gid = current_fsgid();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue