Thread (11 messages) 11 messages, 4 authors, 2012-06-14

Re: Q: a_ops->readpage() && struct file

flat view

From: Peter Zijlstra <peterz@infradead.org>
Date: 2012-06-13 09:58:35
Also in: lkml

On Mon, 2012-06-11 at 21:09 +0200, Oleg Nesterov wrote:
Stupid question. I'm afraid the answer is "no" but I'll ask anyway.
Is it safe to pass filp =3D=3D NULL to mapping->readpage()? In fact
I do not understand why it needs "struct file*" and I do not see
any example of actual usage.=20
Looking at afs_readpage it looks like its OK to pass in NULL. Same for
nfs_readpage. They use the file, if provided, to avoid some lookups, but
seem to deal with not having it.

This answer by example is of course not authorative nor complete.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help