Re: max_fd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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();


If you are updating the fd table, then acuire the file_lock
instead of rcu_read_lock/unlock.

Thanks
Dipankar
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux