Skip to content

Commit a49d273

Browse files
committed
Merge tag 'gfs2-v6.6-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2
Pull gfs2 fixes from Andreas Gruenbacher: - Fix another freeze/thaw hang - Fix glock cache shrinking - Fix the quota=quiet mount option * tag 'gfs2-v6.6-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Fix quota=quiet oversight gfs2: fix glock shrinker ref issues gfs2: Fix another freeze/thaw hang
2 parents ce9ecca + fb95d53 commit a49d273

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

fs/gfs2/glock.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2010,7 +2010,9 @@ static long gfs2_scan_glock_lru(int nr)
20102010
if (!test_bit(GLF_LOCK, &gl->gl_flags)) {
20112011
if (!spin_trylock(&gl->gl_lockref.lock))
20122012
continue;
2013-
if (!gl->gl_lockref.count) {
2013+
if (gl->gl_lockref.count <= 1 &&
2014+
(gl->gl_state == LM_ST_UNLOCKED ||
2015+
demote_ok(gl))) {
20142016
list_move(&gl->gl_lru, &dispose);
20152017
atomic_dec(&lru_count);
20162018
freed++;

fs/gfs2/glops.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -567,15 +567,16 @@ static void freeze_go_callback(struct gfs2_glock *gl, bool remote)
567567
struct super_block *sb = sdp->sd_vfs;
568568

569569
if (!remote ||
570-
gl->gl_state != LM_ST_SHARED ||
570+
(gl->gl_state != LM_ST_SHARED &&
571+
gl->gl_state != LM_ST_UNLOCKED) ||
571572
gl->gl_demote_state != LM_ST_UNLOCKED)
572573
return;
573574

574575
/*
575576
* Try to get an active super block reference to prevent racing with
576-
* unmount (see trylock_super()). But note that unmount isn't the only
577-
* place where a write lock on s_umount is taken, and we can fail here
578-
* because of things like remount as well.
577+
* unmount (see super_trylock_shared()). But note that unmount isn't
578+
* the only place where a write lock on s_umount is taken, and we can
579+
* fail here because of things like remount as well.
579580
*/
580581
if (down_read_trylock(&sb->s_umount)) {
581582
atomic_inc(&sb->s_active);

fs/gfs2/quota.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ static inline int gfs2_quota_lock_check(struct gfs2_inode *ip,
5050
ret = gfs2_quota_lock(ip, NO_UID_QUOTA_CHANGE, NO_GID_QUOTA_CHANGE);
5151
if (ret)
5252
return ret;
53-
if (sdp->sd_args.ar_quota != GFS2_QUOTA_ON)
53+
if (sdp->sd_args.ar_quota != GFS2_QUOTA_ON &&
54+
sdp->sd_args.ar_quota != GFS2_QUOTA_QUIET)
5455
return 0;
5556
ret = gfs2_quota_check(ip, ip->i_inode.i_uid, ip->i_inode.i_gid, ap);
5657
if (ret)

0 commit comments

Comments
 (0)