From: Frank van Maarseveen <frankvm@frankvm.com>
To: Dipankar Sarma <dipankar@in.ibm.com>
Cc: Pablo Fernandez <pablo.ferlop@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: max_fd
Date: Fri, 23 Sep 2005 19:03:45 +0200 [thread overview]
Message-ID: <20050923170345.GA1555@janus> (raw)
In-Reply-To: <20050923155509.GA4723@in.ibm.com>
On Fri, Sep 23, 2005 at 09:25:10PM +0530, Dipankar Sarma wrote:
> On Fri, Sep 23, 2005 at 02:37:51PM +0200, Pablo Fernandez wrote:
> > Hi
> >
> > What happend to files_struct.max_fd? Is it safe to use
> > files_fdtable(files_struct).max_fds?
>
> No.
>
> Just do -
>
> struct fdtable *fdt;
>
> rcu_read_lock();
> fdt = files_fdtable(files_struct);
> if (fdt->max_fds......
> ...
> rcu_read_unlock();
In include/linux/file.h I see this:
#define files_fdtable(files) (rcu_dereference((files)->fdt))
looks better to me unless you really want to update the
struct fdtable.
--
Frank
next prev parent reply other threads:[~2005-09-23 17:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-23 12:37 max_fd Pablo Fernandez
2005-09-23 15:55 ` max_fd Dipankar Sarma
2005-09-23 17:03 ` Frank van Maarseveen [this message]
2005-09-23 17:26 ` max_fd Dipankar Sarma
2005-09-23 18:40 ` max_fd Frank van Maarseveen
2005-09-23 18:46 ` max_fd Dipankar Sarma
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=20050923170345.GA1555@janus \
--to=frankvm@frankvm.com \
--cc=dipankar@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pablo.ferlop@gmail.com \
/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