Re: [PATCH, RFC] Remove fasync() BKL usage, take 3325

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

 



Christoph Hellwig wrote:
On Wed, Jan 28, 2009 at 04:14:39AM +0100, Oleg Nesterov wrote:
I didn't send the actual patch. The idea is,

	can't we use O_LOCK_FLAGS bit? I agree, it is a bit ugly,
	and I won't insist if you don't like is.

		static inline int try_lock_f_flags(struct file *file)
		{
			return !test_and_set_bit(O_LOCK_FLAGS, file->f_flags);
		}

->f_flags is an unsigned int and the bit macros need an unsigned long.
Increasing the size of struct file for this is probably a bad idea.


Could that be seen as a deficiency in the bit macros?

Could we modify them so that they worked on unsigned int as well? I know we could for some architectures.

David Daney
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux