diff options
author | Thierry Reding <treding@nvidia.com> | 2014-11-26 09:41:09 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2014-11-26 09:42:11 +0100 |
commit | 7f06dd61248a75668bbb39b6fcca6ff407745df8 (patch) | |
tree | 30cefbd6f503d20557e24a1765a027687170a7da /fs/notify/inode_mark.c | |
parent | f114040e3ea6e07372334ade75d1ee0775c355e1 (diff) | |
parent | 0690cbd2e55a72a8eae557c389d1a136ed9fa142 (diff) | |
download | op-kernel-dev-7f06dd61248a75668bbb39b6fcca6ff407745df8.zip op-kernel-dev-7f06dd61248a75668bbb39b6fcca6ff407745df8.tar.gz |
Merge branch 'core' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
This branch contains a couple of changes that will conflict with the
Tegra SMMU driver rewrite. Since the driver is largely rewritten the
conflict resolution is non-trivial.
Diffstat (limited to 'fs/notify/inode_mark.c')
-rw-r--r-- | fs/notify/inode_mark.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c index 9ce0622..e849714 100644 --- a/fs/notify/inode_mark.c +++ b/fs/notify/inode_mark.c @@ -288,20 +288,25 @@ void fsnotify_unmount_inodes(struct list_head *list) spin_unlock(&inode->i_lock); /* In case the dropping of a reference would nuke next_i. */ - if ((&next_i->i_sb_list != list) && - atomic_read(&next_i->i_count)) { + while (&next_i->i_sb_list != list) { spin_lock(&next_i->i_lock); - if (!(next_i->i_state & (I_FREEING | I_WILL_FREE))) { + if (!(next_i->i_state & (I_FREEING | I_WILL_FREE)) && + atomic_read(&next_i->i_count)) { __iget(next_i); need_iput = next_i; + spin_unlock(&next_i->i_lock); + break; } spin_unlock(&next_i->i_lock); + next_i = list_entry(next_i->i_sb_list.next, + struct inode, i_sb_list); } /* - * We can safely drop inode_sb_list_lock here because we hold - * references on both inode and next_i. Also no new inodes - * will be added since the umount has begun. + * We can safely drop inode_sb_list_lock here because either + * we actually hold references on both inode and next_i or + * end of list. Also no new inodes will be added since the + * umount has begun. */ spin_unlock(&inode_sb_list_lock); |