From: Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
To: viro@zeniv.linux.org.uk
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: RE: A field in files_struct has been used without initialization
Date: Sun, 9 Oct 2022 11:33:06 +0200 [thread overview]
Message-ID: <20221009093306.24598-1-abd.masalkhi@gmail.com> (raw)
In-Reply-To: <Y0B6+0MLZI/nv1aC@ZenIV>
Hello Al Viro
> close_on_exec_init is an array, and this assignment stores the address
> of its first (and only) element into newf->fdtab.close_on_exec. So it's
> basically
> newf->fdtab.close_on_exec = &newf->close_on_exec_init[0];
>
> ->fdtab and ->close_on_exec_init are to be used only if we need no more than
> BITS_PER_LONG descriptors. It's common enough to make avoiding a separate
> allocation (and separate cacheline on following the pointer chain) worth
> the trouble
> ...
> ...
Fascinating, thank you for this very informative response. I have learned a
lot from it.
next prev parent reply other threads:[~2022-10-09 9:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-06 10:44 A field in files_struct has been used without initialization Abd-Alrhman Masalkhi
2022-10-06 10:57 ` Abd-Alrhman Masalkhi
2022-10-07 19:16 ` Al Viro
2022-10-09 9:33 ` Abd-Alrhman Masalkhi [this message]
2022-10-09 18:21 ` Al Viro
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=20221009093306.24598-1-abd.masalkhi@gmail.com \
--to=abd.masalkhi@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).