[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150628083008.GW17109@ZenIV.linux.org.uk>
Date: Sun, 28 Jun 2015 09:30:08 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Andreas Hartmann <andihartmann@...19freenet.de>
Cc: Richard Weinberger <richard.weinberger@...il.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: f_op->read seems to be always NULL since Linux 4.1
On Sun, Jun 28, 2015 at 08:36:18AM +0200, Andreas Hartmann wrote:
> On Sat, Jun 27, 2015 at 8:10 PM, Richard Weinberger wrote:
> >On Sat, Jun 27, 2015 at 7:32 PM, Andreas Hartmann
> ><andihartmann@...19freenet.de> wrote:
> [...]
> >See __vfs_read().
> >Your module most not rely on such internals.
>
> Thanks for your hint to the function which exists since 3.19.
>
> Is there a site out there which lists all relevant changes done for
> each kernel version and the recommendations how to correctly handle
> them?
localhost. It's in Documentation/filesystems/porting in the kernel
source. To quote the relevant entry (not far from the end - they
are in chronological order):
[mandatory]
never call ->read() and ->write() directly; use __vfs_{read,write} or
wrappers; instead of checking for ->write or ->read being NULL, look for
FMODE_CAN_{WRITE,READ} in file->f_mode.
Sometimes TFM to R _is_ in the natural place...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists