Loading Documentation/filesystems/porting +8 −0 Original line number Original line Diff line number Diff line Loading @@ -455,3 +455,11 @@ in your dentry operations instead. vfs_follow_link has been removed. Filesystems must use nd_set_link vfs_follow_link has been removed. Filesystems must use nd_set_link from ->follow_link for normal symlinks, or nd_jump_link for magic from ->follow_link for normal symlinks, or nd_jump_link for magic /proc/<pid> style links. /proc/<pid> style links. -- [mandatory] iget5_locked()/ilookup5()/ilookup5_nowait() test() callback used to be called with both ->i_lock and inode_hash_lock held; the former is *not* taken anymore, so verify that your callbacks do not rely on it (none of the in-tree instances did). inode_hash_lock is still held, of course, so they are still serialized wrt removal from inode hash, as well as wrt set() callback of iget5_locked(). drivers/staging/lustre/lustre/llite/namei.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -83,7 +83,7 @@ int ll_unlock(__u32 mode, struct lustre_handle *lockh) } } /* called from iget5_locked->find_inode() under inode_lock spinlock */ /* called from iget5_locked->find_inode() under inode_hash_lock spinlock */ static int ll_test_inode(struct inode *inode, void *opaque) static int ll_test_inode(struct inode *inode, void *opaque) { { struct ll_inode_info *lli = ll_i2info(inode); struct ll_inode_info *lli = ll_i2info(inode); Loading fs/inode.c +6 −14 Original line number Original line Diff line number Diff line Loading @@ -773,15 +773,11 @@ static struct inode *find_inode(struct super_block *sb, repeat: repeat: hlist_for_each_entry(inode, head, i_hash) { hlist_for_each_entry(inode, head, i_hash) { spin_lock(&inode->i_lock); if (inode->i_sb != sb) if (inode->i_sb != sb) { spin_unlock(&inode->i_lock); continue; continue; } if (!test(inode, data)) if (!test(inode, data)) { spin_unlock(&inode->i_lock); continue; continue; } spin_lock(&inode->i_lock); if (inode->i_state & (I_FREEING|I_WILL_FREE)) { if (inode->i_state & (I_FREEING|I_WILL_FREE)) { __wait_on_freeing_inode(inode); __wait_on_freeing_inode(inode); goto repeat; goto repeat; Loading @@ -804,15 +800,11 @@ static struct inode *find_inode_fast(struct super_block *sb, repeat: repeat: hlist_for_each_entry(inode, head, i_hash) { hlist_for_each_entry(inode, head, i_hash) { spin_lock(&inode->i_lock); if (inode->i_ino != ino) if (inode->i_ino != ino) { spin_unlock(&inode->i_lock); continue; continue; } if (inode->i_sb != sb) if (inode->i_sb != sb) { spin_unlock(&inode->i_lock); continue; continue; } spin_lock(&inode->i_lock); if (inode->i_state & (I_FREEING|I_WILL_FREE)) { if (inode->i_state & (I_FREEING|I_WILL_FREE)) { __wait_on_freeing_inode(inode); __wait_on_freeing_inode(inode); goto repeat; goto repeat; Loading fs/ntfs/inode.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -55,7 +55,7 @@ * * * Return 1 if the attributes match and 0 if not. * Return 1 if the attributes match and 0 if not. * * * NOTE: This function runs with the inode->i_lock spin lock held so it is not * NOTE: This function runs with the inode_hash_lock spin lock held so it is not * allowed to sleep. * allowed to sleep. */ */ int ntfs_test_inode(struct inode *vi, ntfs_attr *na) int ntfs_test_inode(struct inode *vi, ntfs_attr *na) Loading Loading
Documentation/filesystems/porting +8 −0 Original line number Original line Diff line number Diff line Loading @@ -455,3 +455,11 @@ in your dentry operations instead. vfs_follow_link has been removed. Filesystems must use nd_set_link vfs_follow_link has been removed. Filesystems must use nd_set_link from ->follow_link for normal symlinks, or nd_jump_link for magic from ->follow_link for normal symlinks, or nd_jump_link for magic /proc/<pid> style links. /proc/<pid> style links. -- [mandatory] iget5_locked()/ilookup5()/ilookup5_nowait() test() callback used to be called with both ->i_lock and inode_hash_lock held; the former is *not* taken anymore, so verify that your callbacks do not rely on it (none of the in-tree instances did). inode_hash_lock is still held, of course, so they are still serialized wrt removal from inode hash, as well as wrt set() callback of iget5_locked().
drivers/staging/lustre/lustre/llite/namei.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -83,7 +83,7 @@ int ll_unlock(__u32 mode, struct lustre_handle *lockh) } } /* called from iget5_locked->find_inode() under inode_lock spinlock */ /* called from iget5_locked->find_inode() under inode_hash_lock spinlock */ static int ll_test_inode(struct inode *inode, void *opaque) static int ll_test_inode(struct inode *inode, void *opaque) { { struct ll_inode_info *lli = ll_i2info(inode); struct ll_inode_info *lli = ll_i2info(inode); Loading
fs/inode.c +6 −14 Original line number Original line Diff line number Diff line Loading @@ -773,15 +773,11 @@ static struct inode *find_inode(struct super_block *sb, repeat: repeat: hlist_for_each_entry(inode, head, i_hash) { hlist_for_each_entry(inode, head, i_hash) { spin_lock(&inode->i_lock); if (inode->i_sb != sb) if (inode->i_sb != sb) { spin_unlock(&inode->i_lock); continue; continue; } if (!test(inode, data)) if (!test(inode, data)) { spin_unlock(&inode->i_lock); continue; continue; } spin_lock(&inode->i_lock); if (inode->i_state & (I_FREEING|I_WILL_FREE)) { if (inode->i_state & (I_FREEING|I_WILL_FREE)) { __wait_on_freeing_inode(inode); __wait_on_freeing_inode(inode); goto repeat; goto repeat; Loading @@ -804,15 +800,11 @@ static struct inode *find_inode_fast(struct super_block *sb, repeat: repeat: hlist_for_each_entry(inode, head, i_hash) { hlist_for_each_entry(inode, head, i_hash) { spin_lock(&inode->i_lock); if (inode->i_ino != ino) if (inode->i_ino != ino) { spin_unlock(&inode->i_lock); continue; continue; } if (inode->i_sb != sb) if (inode->i_sb != sb) { spin_unlock(&inode->i_lock); continue; continue; } spin_lock(&inode->i_lock); if (inode->i_state & (I_FREEING|I_WILL_FREE)) { if (inode->i_state & (I_FREEING|I_WILL_FREE)) { __wait_on_freeing_inode(inode); __wait_on_freeing_inode(inode); goto repeat; goto repeat; Loading
fs/ntfs/inode.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -55,7 +55,7 @@ * * * Return 1 if the attributes match and 0 if not. * Return 1 if the attributes match and 0 if not. * * * NOTE: This function runs with the inode->i_lock spin lock held so it is not * NOTE: This function runs with the inode_hash_lock spin lock held so it is not * allowed to sleep. * allowed to sleep. */ */ int ntfs_test_inode(struct inode *vi, ntfs_attr *na) int ntfs_test_inode(struct inode *vi, ntfs_attr *na) Loading