Unverified Commit ae0bc942 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!8921 hugetlbfs: fix hugetlbfs_statfs() locking

parents 65017336 4c1f2c81
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1133,12 +1133,12 @@ static int hugetlbfs_statfs(struct dentry *dentry, struct kstatfs *buf)
		if (sbinfo->spool) {
			long free_pages;

			spin_lock(&sbinfo->spool->lock);
			spin_lock_irq(&sbinfo->spool->lock);
			buf->f_blocks = sbinfo->spool->max_hpages;
			free_pages = sbinfo->spool->max_hpages
				- sbinfo->spool->used_hpages;
			buf->f_bavail = buf->f_bfree = free_pages;
			spin_unlock(&sbinfo->spool->lock);
			spin_unlock_irq(&sbinfo->spool->lock);
			buf->f_files = sbinfo->max_inodes;
			buf->f_ffree = sbinfo->free_inodes;
		}