git: 32e5616359e5 - stable/13 - tmpfs: drop a redundant NULL check in tmpfs_alloc_vp

Mateusz Guzik mjg at FreeBSD.org
Mon Jun 7 00:40:20 UTC 2021


The branch stable/13 has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=32e5616359e5e7551e7a97ec54ee110d4af7e250

commit 32e5616359e5e7551e7a97ec54ee110d4af7e250
Author:     Mateusz Guzik <mjg at FreeBSD.org>
AuthorDate: 2021-05-29 01:10:53 +0000
Commit:     Mateusz Guzik <mjg at FreeBSD.org>
CommitDate: 2021-06-07 00:34:58 +0000

    tmpfs: drop a redundant NULL check in tmpfs_alloc_vp
    
    (cherry picked from commit 439d942b9e7ab4df2bb7a628602069d31788df17)
---
 sys/fs/tmpfs/tmpfs_subr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c
index df5bc12047be..322641b5b853 100644
--- a/sys/fs/tmpfs/tmpfs_subr.c
+++ b/sys/fs/tmpfs/tmpfs_subr.c
@@ -831,7 +831,7 @@ loop:
 		 * Make sure the vnode is still there after
 		 * getting the interlock to avoid racing a free.
 		 */
-		if (node->tn_vnode == NULL || node->tn_vnode != vp) {
+		if (node->tn_vnode != vp) {
 			vput(vp);
 			TMPFS_NODE_LOCK(node);
 			goto loop;


More information about the dev-commits-src-all mailing list