Patch "ocfs2: fix passing zero to 'PTR_ERR' warning" 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

    ocfs2: fix passing zero to 'PTR_ERR' warning

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:
     ocfs2-fix-passing-zero-to-ptr_err-warning.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 4418b91718666551ef45c5f0709ce67eeb1efe36
Author: Ding Xiang <dingxiang@xxxxxxxxxxxxxxxxxxxx>
Date:   Sat Nov 30 17:49:12 2019 -0800

    ocfs2: fix passing zero to 'PTR_ERR' warning
    
    [ Upstream commit 188c523e1c271d537f3c9f55b6b65bf4476de32f ]
    
    Fix a static code checker warning:
    fs/ocfs2/acl.c:331
            ocfs2_acl_chmod() warn: passing zero to 'PTR_ERR'
    
    Link: http://lkml.kernel.org/r/1dee278b-6c96-eec2-ce76-fe6e07c6e20f@xxxxxxxxxxxxxxxxx
    Fixes: 5ee0fbd50fd ("ocfs2: revert using ocfs2_acl_chmod to avoid inode cluster lock hang")
    Signed-off-by: Ding Xiang <dingxiang@xxxxxxxxxxxxxxxxxxxx>
    Reviewed-by: Joseph Qi <joseph.qi@xxxxxxxxxxxxxxxxx>
    Cc: Mark Fasheh <mark@xxxxxxxxxx>
    Cc: Joel Becker <jlbec@xxxxxxxxxxxx>
    Cc: Junxiao Bi <junxiao.bi@xxxxxxxxxx>
    Cc: Changwei Ge <gechangwei@xxxxxxx>
    Cc: Gang He <ghe@xxxxxxxx>
    Cc: Jun Piao <piaojun@xxxxxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/ocfs2/acl.c b/fs/ocfs2/acl.c
index 917fadca8a7b..b73b78771915 100644
--- a/fs/ocfs2/acl.c
+++ b/fs/ocfs2/acl.c
@@ -335,8 +335,8 @@ int ocfs2_acl_chmod(struct inode *inode, struct buffer_head *bh)
 	down_read(&OCFS2_I(inode)->ip_xattr_sem);
 	acl = ocfs2_get_acl_nolock(inode, ACL_TYPE_ACCESS, bh);
 	up_read(&OCFS2_I(inode)->ip_xattr_sem);
-	if (IS_ERR(acl) || !acl)
-		return PTR_ERR(acl);
+	if (IS_ERR_OR_NULL(acl))
+		return PTR_ERR_OR_ZERO(acl);
 	ret = __posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode);
 	if (ret)
 		return ret;



[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