Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9e4ab12 authored by Chengguang Xu's avatar Chengguang Xu Committed by Sasha Levin
Browse files

quota: code cleanup for __dquot_alloc_space()



[ Upstream commit df15a2a59d0b29d86e17140b83ed231adaded12f ]

Replace (flags & DQUOT_SPACE_RESERVE) with
variable reserve.

Signed-off-by: default avatarChengguang Xu <cgxu519@gmx.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Stable-dep-of: 179b8c97ebf6 ("quota: Fix rcu annotations of inode dquot pointers")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d258d124
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1743,7 +1743,7 @@ int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags)
	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
		if (!dquots[cnt])
			continue;
		if (flags & DQUOT_SPACE_RESERVE) {
		if (reserve) {
			ret = dquot_add_space(dquots[cnt], 0, number, flags,
					      &warn[cnt]);
		} else {
@@ -1756,7 +1756,7 @@ int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags)
				if (!dquots[cnt])
					continue;
				spin_lock(&dquots[cnt]->dq_dqb_lock);
				if (flags & DQUOT_SPACE_RESERVE) {
				if (reserve) {
					dquots[cnt]->dq_dqb.dqb_rsvspace -=
									number;
				} else {