Patch "quota: code cleanup for __dquot_alloc_space()" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    quota: code cleanup for __dquot_alloc_space()

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     quota-code-cleanup-for-__dquot_alloc_space.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 03a005e50851d70cbe4d39407bbc50879b372859
Author: Chengguang Xu <cgxu519@xxxxxxx>
Date:   Wed Mar 20 13:03:59 2019 +0800

    quota: code cleanup for __dquot_alloc_space()
    
    [ Upstream commit df15a2a59d0b29d86e17140b83ed231adaded12f ]
    
    Replace (flags & DQUOT_SPACE_RESERVE) with
    variable reserve.
    
    Signed-off-by: Chengguang Xu <cgxu519@xxxxxxx>
    Signed-off-by: Jan Kara <jack@xxxxxxx>
    Stable-dep-of: 179b8c97ebf6 ("quota: Fix rcu annotations of inode dquot pointers")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 868936076f41d..683727c5758c0 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -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 {




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux