From: Dan Carpenter <dan.carpenter@oracle.com>
To: kirill.shutemov@linux.intel.com
Cc: linux-mm@kvack.org
Subject: [bug report] shmem: prepare huge= mount option and sysfs knob
Date: Thu, 17 Aug 2017 13:25:14 +0300 [thread overview]
Message-ID: <20170817102514.7rhgjjuawxr4gubp@mwanda> (raw)
Hello Kirill A. Shutemov,
The patch 5a6e75f8110c: "shmem: prepare huge= mount option and sysfs
knob" from Jul 26, 2016, leads to the following static checker
warning:
mm/shmem.c:4013 shmem_init()
warn: assigning (-2) to unsigned variable 'SHMEM_SB(shm_mnt->mnt_sb)->huge'
mm/shmem.c
4012 #ifdef CONFIG_TRANSPARENT_HUGE_PAGECACHE
4013 if (has_transparent_hugepage() && shmem_huge < SHMEM_HUGE_DENY)
4014 SHMEM_SB(shm_mnt->mnt_sb)->huge = shmem_huge;
SHMEM_HUGE_DENY is -1 so the value less than that is SHMEM_HUGE_FORCE (-2).
4015 else
4016 shmem_huge = 0; /* just in case it was patched */
4017 #endif
4018 return 0;
Btw, if shmem_parse_huge() returns SHMEM_HUGE_FORCE, then both callers
treat that as an error. The handling for SHMEM_HUGE_FORCE is confusing
for my tiny brain.
regards,
dan carpenter
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
reply other threads:[~2017-08-17 10:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170817102514.7rhgjjuawxr4gubp@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox