summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2026-10-29 11:43:23 +0100
committerDavid Hildenbrand (Arm) <david@kernel.org>2026-11-02 11:21:28 +0100
commit968d73463059156e1b89bfa6b189acd7d27197b2 (patch)
treeee92bf7a5fac12e1efe9053cefd920714bac5a00 /tools/lib/python
parent68b2aa37afa390f08de13bc0bac61a9ded3318bc (diff)
tmpfs: keep the quota soft limits of an unused id
When the last reference to a dquot goes away, shmem_release_dquot() stores its limits in the rb tree of the mount, unless shmem_is_empty_dquot() says that there is nothing worth storing. That function looks at the usage and at the two hard limits only. So if the administrator sets nothing but soft limits for an id that owns no file yet, the entry is thrown away as soon as the dquot that Q_SETQUOTA used is released, and the id never gets to see a limit. To fix it, compare the soft limits as well: an entry can be empty only if both soft limits are zero as well, which is exactly what shmem_acquire_dquot() sets for a new entry. Fix generated by an LLM and sent by Josef Bacik in private. Fixes: de4c0e7ca8b5 ("shmem: Add default quota limit mount options") Cc: stable@vger.kernel.org Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: Jan Kara <jack@suse.cz> Tested-by: Gregory Price (Meta) <gourry@gourry.net> [ david: slightly adjusted description ] Link: https://patch.msgid.link/20261029-fixes_shmem-v4-2-392fc715d8f6@kernel.org Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions