lkml.org 
[lkml]   [2019]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 1/6] vfs, coda: Fix the lack of locking in FID replacement inode rehashing
On Thu, Apr 18, 2019 at 03:06:07PM +0100, David Howells wrote:
> Fix this by moving the core part of the code to fs/inode.c and providing it
> with a set() function akin to iget5(). We can then take the inode cache
> lock whilst performing the move.

> @@ -123,6 +132,8 @@ void coda_replace_fid(struct inode *inode, struct CodaFid *oldfid,
>
> BUG_ON(!coda_fideq(&cii->c_fid, oldfid));
>
> + rehash_inode(inode, hash, coda_reset_inode, newfid);
> +
> /* replace fid and rehash inode */
> /* XXX we probably need to hold some lock here! */
> remove_inode_hash(inode);

Don't you also need to delete the remove_inode_hash() and
__insert_inode_hash() calls?

\
 
 \ /
  Last update: 2019-04-18 18:12    [W:0.076 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site