summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-05-20 06:20:15 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2021-05-20 06:20:15 -1000
commit7ac177143caef12b174583e410b7240c33f0289d (patch)
treef08c8b4beac1956d1a06a870d5a6746d302da912 /fs
parentc3d0e3fd41b7f0f5d5d5b6022ab7e813f04ea727 (diff)
parent5b9fedb31e476693c90d8ee040e7d4c51b3e7cc4 (diff)
downloadlinux-stable-7ac177143caef12b174583e410b7240c33f0289d.tar.gz
linux-stable-7ac177143caef12b174583e410b7240c33f0289d.tar.bz2
linux-stable-7ac177143caef12b174583e410b7240c33f0289d.zip
Merge tag 'quota_for_v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull quota fixes from Jan Kara: "The most important part in the pull is disablement of the new syscall quotactl_path() which was added in rc1. The reason is some people at LWN discussion pointed out dirfd would be useful for this path based syscall and Christian Brauner agreed. Without dirfd it may be indeed problematic for containers. So let's just disable the syscall for now when it doesn't have users yet so that we have more time to mull over how to best specify the filesystem we want to work on" * tag 'quota_for_v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: quota: Disable quotactl_path syscall quota: Use 'hlist_for_each_entry' to simplify code
Diffstat (limited to 'fs')
-rw-r--r--fs/quota/dquot.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 4f1373463766..22d904bde6ab 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -288,14 +288,12 @@ static inline void remove_dquot_hash(struct dquot *dquot)
static struct dquot *find_dquot(unsigned int hashent, struct super_block *sb,
struct kqid qid)
{
- struct hlist_node *node;
struct dquot *dquot;
- hlist_for_each (node, dquot_hash+hashent) {
- dquot = hlist_entry(node, struct dquot, dq_hash);
+ hlist_for_each_entry(dquot, dquot_hash+hashent, dq_hash)
if (dquot->dq_sb == sb && qid_eq(dquot->dq_id, qid))
return dquot;
- }
+
return NULL;
}