From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Aneesh Kumar K. V" Subject: Re: [PATCH -V6 0/8] Generic name to handle and open by handle syscalls Date: Wed, 28 Apr 2010 10:39:54 +0530 Message-ID: <87ljc89n8d.fsf@linux.vnet.ibm.com> References: <1272384830-22670-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <2ED2587E-A03D-4C3B-8E7E-711434C7736C@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: hch@infradead.org, viro@zeniv.linux.org.uk, adilger@Sun.COM, corbet@lwn.net, serue@us.ibm.com, neilb@suse.de, linux-fsdevel@vger.kernel.org, sfrench@us.ibm.com To: Andreas Dilger Return-path: Received: from e23smtp08.au.ibm.com ([202.81.31.141]:39618 "EHLO e23smtp08.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750803Ab0D1FKF (ORCPT ); Wed, 28 Apr 2010 01:10:05 -0400 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247]) by e23smtp08.au.ibm.com (8.14.3/8.13.1) with ESMTP id o3S5AFmk021011 for ; Wed, 28 Apr 2010 15:10:15 +1000 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o3S53Dqw1253396 for ; Wed, 28 Apr 2010 15:03:14 +1000 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o3S5A1kO007793 for ; Wed, 28 Apr 2010 15:10:02 +1000 In-Reply-To: <2ED2587E-A03D-4C3B-8E7E-711434C7736C@oracle.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, 27 Apr 2010 15:13:20 -0600, Andreas Dilger wrote: > > On 2010-04-27, at 10:13, Aneesh Kumar K.V wrote: > > Changes from V5: > > a) added sys_name_to_handle_at syscall which takes AT_SYMLINK_NOFOLLOW flag > > instead of two syscalls sys_name_to_handle and sys_lname_to_handle. > > > > #define AT_FDCWD -100 > > #define AT_SYMLINK_NOFOLLOW 0x100 > > > > static int name_to_handle(const char *name, struct file_handle *fh) > > { > > return syscall(338, AT_FDCWD, name, fh, 0); > > } > > > > static int lname_to_handle(const char *name, struct file_handle *fh) > > { > > return syscall(338, AT_FDCWD, name, fh, AT_SYMLINK_NOFOLLOW); > > } > > > > static int open_by_handle(struct file_handle *fh, int flags) > > { > > return syscall(339, fh, flags); > > } > > > > static int freadlink(int fd, char *buf, size_t bufsiz) > > { > > return syscall(340, fd, buf, bufsiz); > > } > > Your example, while #defining the AT_* stuff, did not actually change to use the _at() interface. > I retained the name name_to_handle and lname_to_handle in the example but used the same syscall number for both with right flags. So it should be using syscall sys_name_to_handle_at -aneesh