diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-01-10 20:36:40 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-01-10 20:36:40 +0300 |
commit | bfed9a92940bae1fbdaad80b82562ce4e122434a (patch) | |
tree | 8e9638315eb66408bec7e0d14c8f76e481e92800 /fs/gfs2/quota.c | |
parent | affc5af36bbb62073b6aaa4f4459b38937ff5331 (diff) | |
parent | e345b87b0b0444d1c644b0ea15cfb50e88f10b55 (diff) | |
download | linux-bfed9a92940bae1fbdaad80b82562ce4e122434a.tar.xz |
Merge tag 'gfs2-v6.7-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2
Pull gfs2 updates from Andreas Gruenbacher:
- Add support for non-blocking lookup (MAY_NOT_BLOCK / LOOKUP_RCU)
- Various minor fixes and cleanups
* tag 'gfs2-v6.7-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
gfs2: Fix freeze consistency check in log_write_header
gfs2: Refcounting fix in gfs2_thaw_super
gfs2: Minor gfs2_{freeze,thaw}_super cleanup
gfs2: Use wait_event_freezable_timeout() for freezable kthread
gfs2: Add missing set_freezable() for freezable kthread
gfs2: Remove use of error flag in journal reads
gfs2: Lift withdraw check out of gfs2_ail1_empty
gfs2: Rename gfs2_withdrawn to gfs2_withdrawing_or_withdrawn
gfs2: Mark withdraws as unlikely
gfs2: Minor gfs2_ail1_empty cleanup
gfs2: use is_subdir()
gfs2: d_obtain_alias(ERR_PTR(...)) will do the right thing
gfs2: Use GL_NOBLOCK flag for non-blocking lookups
gfs2: Add GL_NOBLOCK flag
gfs2: rgrp: fix kernel-doc warnings
gfs2: fix kernel BUG in gfs2_quota_cleanup
gfs2: Fix inode_go_instantiate description
gfs2: Fix kernel NULL pointer dereference in gfs2_rgrp_dump
Diffstat (limited to 'fs/gfs2/quota.c')
-rw-r--r-- | fs/gfs2/quota.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index b57f8c7b35be..aa9cf0102848 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -128,7 +128,7 @@ static void gfs2_qd_dispose(struct gfs2_quota_data *qd) hlist_bl_del_rcu(&qd->qd_hlist); spin_unlock_bucket(qd->qd_hash); - if (!gfs2_withdrawn(sdp)) { + if (!gfs2_withdrawing_or_withdrawn(sdp)) { gfs2_assert_warn(sdp, !qd->qd_change); gfs2_assert_warn(sdp, !qd->qd_slot_ref); gfs2_assert_warn(sdp, !qd->qd_bh_count); @@ -1505,7 +1505,8 @@ void gfs2_quota_cleanup(struct gfs2_sbd *sdp) LIST_HEAD(dispose); int count; - BUG_ON(test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)); + BUG_ON(!test_bit(SDF_NORECOVERY, &sdp->sd_flags) && + test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)); spin_lock(&qd_lock); list_for_each_entry(qd, &sdp->sd_quota_list, qd_list) { @@ -1539,7 +1540,7 @@ static void quotad_error(struct gfs2_sbd *sdp, const char *msg, int error) { if (error == 0 || error == -EROFS) return; - if (!gfs2_withdrawn(sdp)) { + if (!gfs2_withdrawing_or_withdrawn(sdp)) { if (!cmpxchg(&sdp->sd_log_error, 0, error)) fs_err(sdp, "gfs2_quotad: %s error %d\n", msg, error); wake_up(&sdp->sd_logd_waitq); @@ -1582,8 +1583,9 @@ int gfs2_quotad(void *data) unsigned long quotad_timeo = 0; unsigned long t = 0; + set_freezable(); while (!kthread_should_stop()) { - if (gfs2_withdrawn(sdp)) + if (gfs2_withdrawing_or_withdrawn(sdp)) break; /* Update the master statfs file */ @@ -1601,13 +1603,11 @@ int gfs2_quotad(void *data) quotad_check_timeo(sdp, "sync", gfs2_quota_sync, t, "ad_timeo, &tune->gt_quota_quantum); - try_to_freeze(); - t = min(quotad_timeo, statfs_timeo); - t = wait_event_interruptible_timeout(sdp->sd_quota_wait, + t = wait_event_freezable_timeout(sdp->sd_quota_wait, sdp->sd_statfs_force_sync || - gfs2_withdrawn(sdp) || + gfs2_withdrawing_or_withdrawn(sdp) || kthread_should_stop(), t); |