Commit ddf26a67 authored by Jinjiang Tu's avatar Jinjiang Tu
Browse files

Revert "hugetlbfs: fix hugetlbfs_statfs() locking"

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I9SZXR



--------------------------------

This reverts commit 6983a327.

The prior patches are not merged, this commit will leads to do heavy
things and even schedule with irq disabled. So revert it first.

Signed-off-by: default avatarJinjiang Tu <tujinjiang@huawei.com>
parent d2901c3f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1099,12 +1099,12 @@ static int hugetlbfs_statfs(struct dentry *dentry, struct kstatfs *buf)
		if (sbinfo->spool) {
			long free_pages;

			spin_lock_irq(&sbinfo->spool->lock);
			spin_lock(&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_irq(&sbinfo->spool->lock);
			spin_unlock(&sbinfo->spool->lock);
			buf->f_files = sbinfo->max_inodes;
			buf->f_ffree = sbinfo->free_inodes;
		}