Commit a49d273e authored by Linus Torvalds's avatar Linus Torvalds

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
parents ce9ecca0 fb95d536
...@@ -2010,7 +2010,9 @@ static long gfs2_scan_glock_lru(int nr) ...@@ -2010,7 +2010,9 @@ static long gfs2_scan_glock_lru(int nr)
if (!test_bit(GLF_LOCK, &gl->gl_flags)) { if (!test_bit(GLF_LOCK, &gl->gl_flags)) {
if (!spin_trylock(&gl->gl_lockref.lock)) if (!spin_trylock(&gl->gl_lockref.lock))
continue; continue;
if (!gl->gl_lockref.count) { if (gl->gl_lockref.count <= 1 &&
(gl->gl_state == LM_ST_UNLOCKED ||
demote_ok(gl))) {
list_move(&gl->gl_lru, &dispose); list_move(&gl->gl_lru, &dispose);
atomic_dec(&lru_count); atomic_dec(&lru_count);
freed++; freed++;
......
...@@ -567,15 +567,16 @@ static void freeze_go_callback(struct gfs2_glock *gl, bool remote) ...@@ -567,15 +567,16 @@ static void freeze_go_callback(struct gfs2_glock *gl, bool remote)
struct super_block *sb = sdp->sd_vfs; struct super_block *sb = sdp->sd_vfs;
if (!remote || if (!remote ||
gl->gl_state != LM_ST_SHARED || (gl->gl_state != LM_ST_SHARED &&
gl->gl_state != LM_ST_UNLOCKED) ||
gl->gl_demote_state != LM_ST_UNLOCKED) gl->gl_demote_state != LM_ST_UNLOCKED)
return; return;
/* /*
* Try to get an active super block reference to prevent racing with * Try to get an active super block reference to prevent racing with
* unmount (see trylock_super()). But note that unmount isn't the only * unmount (see super_trylock_shared()). But note that unmount isn't
* place where a write lock on s_umount is taken, and we can fail here * the only place where a write lock on s_umount is taken, and we can
* because of things like remount as well. * fail here because of things like remount as well.
*/ */
if (down_read_trylock(&sb->s_umount)) { if (down_read_trylock(&sb->s_umount)) {
atomic_inc(&sb->s_active); atomic_inc(&sb->s_active);
......
...@@ -50,7 +50,8 @@ static inline int gfs2_quota_lock_check(struct gfs2_inode *ip, ...@@ -50,7 +50,8 @@ static inline int gfs2_quota_lock_check(struct gfs2_inode *ip,
ret = gfs2_quota_lock(ip, NO_UID_QUOTA_CHANGE, NO_GID_QUOTA_CHANGE); ret = gfs2_quota_lock(ip, NO_UID_QUOTA_CHANGE, NO_GID_QUOTA_CHANGE);
if (ret) if (ret)
return ret; return ret;
if (sdp->sd_args.ar_quota != GFS2_QUOTA_ON) if (sdp->sd_args.ar_quota != GFS2_QUOTA_ON &&
sdp->sd_args.ar_quota != GFS2_QUOTA_QUIET)
return 0; return 0;
ret = gfs2_quota_check(ip, ip->i_inode.i_uid, ip->i_inode.i_gid, ap); ret = gfs2_quota_check(ip, ip->i_inode.i_uid, ip->i_inode.i_gid, ap);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment