+1
-1
fs/drop_caches.c
+1
-1
fs/drop_caches.c
···
35
35
spin_unlock(&inode->i_lock);
36
36
spin_unlock(&sb->s_inode_list_lock);
37
37
38
-
cond_resched();
39
38
invalidate_mapping_pages(inode->i_mapping, 0, -1);
40
39
iput(toput_inode);
41
40
toput_inode = inode;
42
41
42
+
cond_resched();
43
43
spin_lock(&sb->s_inode_list_lock);
44
44
}
45
45
spin_unlock(&sb->s_inode_list_lock);
+7
fs/inode.c
+7
fs/inode.c
···
676
676
struct inode *inode, *next;
677
677
LIST_HEAD(dispose);
678
678
679
+
again:
679
680
spin_lock(&sb->s_inode_list_lock);
680
681
list_for_each_entry_safe(inode, next, &sb->s_inodes, i_sb_list) {
681
682
spin_lock(&inode->i_lock);
···
699
698
inode_lru_list_del(inode);
700
699
spin_unlock(&inode->i_lock);
701
700
list_add(&inode->i_lru, &dispose);
701
+
if (need_resched()) {
702
+
spin_unlock(&sb->s_inode_list_lock);
703
+
cond_resched();
704
+
dispose_list(&dispose);
705
+
goto again;
706
+
}
702
707
}
703
708
spin_unlock(&sb->s_inode_list_lock);
704
709
+4
fs/notify/fsnotify.c
+4
fs/notify/fsnotify.c
···
57
57
* doing an __iget/iput with SB_ACTIVE clear would actually
58
58
* evict all inodes with zero i_count from icache which is
59
59
* unnecessarily violent and may in fact be illegal to do.
60
+
* However, we should have been called /after/ evict_inodes
61
+
* removed all zero refcount inodes, in any case. Test to
62
+
* be sure.
60
63
*/
61
64
if (!atomic_read(&inode->i_count)) {
62
65
spin_unlock(&inode->i_lock);
···
80
77
81
78
iput_inode = inode;
82
79
80
+
cond_resched();
83
81
spin_lock(&sb->s_inode_list_lock);
84
82
}
85
83
spin_unlock(&sb->s_inode_list_lock);
+1
fs/quota/dquot.c
+1
fs/quota/dquot.c
+3
-1
fs/super.c
+3
-1
fs/super.c
···
448
448
sync_filesystem(sb);
449
449
sb->s_flags &= ~SB_ACTIVE;
450
450
451
-
fsnotify_sb_delete(sb);
452
451
cgroup_writeback_umount();
453
452
453
+
/* evict all inodes with zero refcount */
454
454
evict_inodes(sb);
455
+
/* only nonzero refcount inodes can have marks */
456
+
fsnotify_sb_delete(sb);
455
457
456
458
if (sb->s_dio_done_wq) {
457
459
destroy_workqueue(sb->s_dio_done_wq);
+2
-1
lib/iov_iter.c
+2
-1
lib/iov_iter.c
···
1222
1222
1223
1223
unsigned long iov_iter_alignment(const struct iov_iter *i)
1224
1224
{
1225
-
unsigned int p_mask = i->pipe->ring_size - 1;
1226
1225
unsigned long res = 0;
1227
1226
size_t size = i->count;
1228
1227
1229
1228
if (unlikely(iov_iter_is_pipe(i))) {
1229
+
unsigned int p_mask = i->pipe->ring_size - 1;
1230
+
1230
1231
if (size && i->iov_offset && allocated(&i->pipe->bufs[i->head & p_mask]))
1231
1232
return size | i->iov_offset;
1232
1233
return size;