Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932263AbbDKCfM (ORCPT ); Fri, 10 Apr 2015 22:35:12 -0400 Received: from nebula-exfe-02.nebula.fi ([83.145.198.164]:6055 "EHLO ex10.nebula.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751967AbbDKCfH convert rfc822-to-8bit (ORCPT ); Fri, 10 Apr 2015 22:35:07 -0400 X-Greylist: delayed 325 seconds by postgrey-1.27 at vger.kernel.org; Fri, 10 Apr 2015 22:35:07 EDT From: Anton Altaparmakov To: Al Viro CC: Linus Torvalds , Andrew Morton , "Eric W. Biederman" , linux-fsdevel , Linux Kernel Mailing List Subject: i_uid_read()/i_uid_write() and friends Thread-Topic: i_uid_read()/i_uid_write() and friends Thread-Index: AQHQc/9ckM1G5TFwLEmC6nGAaOmWfg== Date: Sat, 11 Apr 2015 02:29:39 +0000 Message-ID: <0227447F-5665-4B5C-A71D-8DAB5452360A@tuxera.com> Accept-Language: en-GB, fi-FI, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [86.154.101.250] Content-Type: text/plain; charset="us-ascii" Content-ID: <81479DF436DF5646BCFD4C51C7CB3D10@nebula.local> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1270 Lines: 35 Hi, Is it intended that non-gpl file systems cannot use functions like i_uid_read() and i_uid_write() (introduced by Eric Biederman in 3.5 kernel)? They resolve to the below (in include/linux/fs.h): static inline uid_t i_uid_read(const struct inode *inode) { return from_kuid(&init_user_ns, inode->i_uid); } static inline void i_uid_write(struct inode *inode, uid_t uid) { inode->i_uid = make_kuid(&init_user_ns, uid); } And both from_kuid() and make_kuid() are EXPORT_SYMBOL() so they are fine but the problem is that init_user_ns is EXPORT_SYMBOL_GPL() and because i_uid_read() and i_uid_write() are static inline it causes them to be unusable from non-gpl kernel modules... Same thing applies to i_gid_read() and i_gid_write(). These seem pretty fundamental calls that a non-gpl file system should be able to call, no? Best regards, Anton -- Anton Altaparmakov (replace at with @) Lead in File System Development, Tuxera Inc., http://www.tuxera.com/ Linux NTFS maintainer -- 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/