ensure unique i_ino in filesystems without permanent inode numbers (pipefs)
Subsystems (3)
PATCH 3/3 ensure unique i_ino in filesystems without permanent inode numbers (pipefs)
pipefs is a rather busy filesystem and so is a good place to start to make sure we flush out any performance problems
Signed-off-by Jeff Layton <[email protected]>
fs/pipe.c +3 -0
@@ -845,6 +845,9 @@ static struct inode * get_pipe_inode(voiif (!inode) goto fail_inode; +if (iunique_register (inode,0 )) + goto fail_iput; + pipe =alloc_pipe_info (inode);if (!pipe) goto fail_iput;
Quoted 3 lines · Jeff Layton
pipefs is a rather busy filesystem and so is a good place to start to make sure we flush out any performance problems
This patch changes the earlier patch to use the new_registered_inode wrapper and that simplifies things a bit. It also goes ahead and changes over sockfs in the same way.
Signed-off-by Jeff Layton <[email protected]>
fs/pipe.c +1 -1
@@ -846,7 +846,7 @@ static struct dentry_operations pipefs_dstatic struct inode *get_pipe_inode (void ) { -struct inode *inode =new_inode (pipe_mnt->mnt_sb); +struct inode *inode =new_registered_inode (pipe_mnt->mnt_sb,0 );struct pipe_inode_info *pipe;if (!inode)
net/socket.c +1 -1
@@ -486,7 +486,7 @@ static struct socket *sock_alloc(void)struct inode *inode;struct socket *sock; - inode =new_inode (sock_mnt->mnt_sb); + inode =new_registered_inode (sock_mnt->mnt_sb,0 );if (!inode)return NULL ;