Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752394AbbF1IaU (ORCPT ); Sun, 28 Jun 2015 04:30:20 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:51898 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752252AbbF1IaM (ORCPT ); Sun, 28 Jun 2015 04:30:12 -0400 Date: Sun, 28 Jun 2015 09:30:08 +0100 From: Al Viro To: Andreas Hartmann Cc: Richard Weinberger , LKML Subject: Re: f_op->read seems to be always NULL since Linux 4.1 Message-ID: <20150628083008.GW17109@ZenIV.linux.org.uk> References: <558F95E2.7070303@01019freenet.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <558F95E2.7070303@01019freenet.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1194 Lines: 29 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 > > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/