Re: [PATCH] int (*readpage)(struct file *, struct page *);

From: Deven T. Corzine (
Date: Thu May 11 2000 - 12:53:20 EST

On Thu, 11 May 2000, Linus Torvalds wrote:

> On Thu, 11 May 2000, Deven T. Corzine wrote:
> >
> > If it doesn't seem inherently obvious that the parameter could be NULL (and
> > I'm not disputing that),

(I should note that while I didn't dispute that claim, neither did I
support it -- I didn't try to evaluate it at all. I was only remarking on
the idea of changing the parameter name to "file_or_null"...)

> So we should definitely _not_ document that "file can be NULL". In fact,
> under normal circumstances it really cannot. Instead, the documentation
> should say that "if you're using the page_symlink_inode_operations helper
> functions, the address space operations associated with the symlink have
> to be able to handle a NULL file pointer".

Sounds good -- how about a comment exactly like this near the parameter?
This is what I meant -- that a comment could do a better job of explaining
when and why it might be NULL, with less chance of drift than separate
documentation has...


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:18 EST