@@ -112,7 +112,7 @@ static unsigned long super_cache_scan(struct shrinker *shrink,
112
112
if (!(sc -> gfp_mask & __GFP_FS ))
113
113
return SHRINK_STOP ;
114
114
115
- if (!trylock_super (sb ))
115
+ if (!super_trylock_shared (sb ))
116
116
return SHRINK_STOP ;
117
117
118
118
if (sb -> s_op -> nr_cached_objects )
@@ -159,17 +159,17 @@ static unsigned long super_cache_count(struct shrinker *shrink,
159
159
sb = container_of (shrink , struct super_block , s_shrink );
160
160
161
161
/*
162
- * We don't call trylock_super () here as it is a scalability bottleneck,
163
- * so we're exposed to partial setup state. The shrinker rwsem does not
164
- * protect filesystem operations backing list_lru_shrink_count() or
165
- * s_op->nr_cached_objects(). Counts can change between
166
- * super_cache_count and super_cache_scan, so we really don't need locks
167
- * here.
162
+ * We don't call super_trylock_shared () here as it is a scalability
163
+ * bottleneck, so we're exposed to partial setup state. The shrinker
164
+ * rwsem does not protect filesystem operations backing
165
+ * list_lru_shrink_count() or s_op->nr_cached_objects(). Counts can
166
+ * change between super_cache_count and super_cache_scan, so we really
167
+ * don't need locks here.
168
168
*
169
169
* However, if we are currently mounting the superblock, the underlying
170
170
* filesystem might be in a state of partial construction and hence it
171
- * is dangerous to access it. trylock_super () uses a SB_BORN check to
172
- * avoid this situation, so do the same here. The memory barrier is
171
+ * is dangerous to access it. super_trylock_shared () uses a SB_BORN check
172
+ * to avoid this situation, so do the same here. The memory barrier is
173
173
* matched with the one in mount_fs() as we don't hold locks here.
174
174
*/
175
175
if (!(sb -> s_flags & SB_BORN ))
@@ -428,7 +428,7 @@ static int grab_super(struct super_block *s) __releases(sb_lock)
428
428
}
429
429
430
430
/*
431
- * trylock_super - try to grab ->s_umount shared
431
+ * super_trylock_shared - try to grab ->s_umount shared
432
432
* @sb: reference we are trying to grab
433
433
*
434
434
* Try to prevent fs shutdown. This is used in places where we
@@ -444,7 +444,7 @@ static int grab_super(struct super_block *s) __releases(sb_lock)
444
444
* of down_read(). There's a couple of places that are OK with that, but
445
445
* it's very much not a general-purpose interface.
446
446
*/
447
- bool trylock_super (struct super_block * sb )
447
+ bool super_trylock_shared (struct super_block * sb )
448
448
{
449
449
if (down_read_trylock (& sb -> s_umount )) {
450
450
if (!hlist_unhashed (& sb -> s_instances ) &&
@@ -1210,7 +1210,7 @@ EXPORT_SYMBOL(get_tree_keyed);
1210
1210
* and the place that clears the pointer to the superblock used by this function
1211
1211
* before freeing the superblock.
1212
1212
*/
1213
- static bool lock_active_super (struct super_block * sb )
1213
+ static bool super_lock_shared_active (struct super_block * sb )
1214
1214
{
1215
1215
super_lock_shared (sb );
1216
1216
if (!sb -> s_root ||
@@ -1228,7 +1228,7 @@ static void fs_bdev_mark_dead(struct block_device *bdev, bool surprise)
1228
1228
/* bd_holder_lock ensures that the sb isn't freed */
1229
1229
lockdep_assert_held (& bdev -> bd_holder_lock );
1230
1230
1231
- if (!lock_active_super (sb ))
1231
+ if (!super_lock_shared_active (sb ))
1232
1232
return ;
1233
1233
1234
1234
if (!surprise )
@@ -1247,7 +1247,7 @@ static void fs_bdev_sync(struct block_device *bdev)
1247
1247
1248
1248
lockdep_assert_held (& bdev -> bd_holder_lock );
1249
1249
1250
- if (!lock_active_super (sb ))
1250
+ if (!super_lock_shared_active (sb ))
1251
1251
return ;
1252
1252
sync_filesystem (sb );
1253
1253
super_unlock_shared (sb );
0 commit comments