Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp922884imm; Fri, 22 Jun 2018 07:33:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKmno24BDhKvsEQ7JGDftJAyDGjbLJdEmOjPZ791aVTjirC45wCpRGqgvOQicwmPBDND3yv X-Received: by 2002:a62:138c:: with SMTP id 12-v6mr2077294pft.34.1529678011279; Fri, 22 Jun 2018 07:33:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529678011; cv=none; d=google.com; s=arc-20160816; b=lQ7zw/ocVIw0pXZ+LgS8vpcOfGFWR9w64Zf22INmboUngE+lEgdlrGG225JBqQavl/ zufDV45T211AGC5uOg52ttkeiC3KWJXTrxWaT6TakoDFvJvZc77iAEsZoO4PQch7Oc1o xsW0UG34gP7cZ8zSFc4KX2x0kl/EMkeKWhMJr9yFLOsiciDavI7Qcl4l8lyjUXpRwh+M w58ga7R1pUXyQ+7Y/rg26vIh6ubOrgCTqJ8Ny/48fbD32mvqN2q06nJ9OKs+ml5PFx2q hNXAlRre8hYobZQue7XOULUQOsW22mU+FS5aq/6pzerFk2LKCV6CoV7tjEnZ3rM+CSWt iB/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=jNwA84yg/BOhiW3xZ9QbhqlEHW7VhpWObpOVS2P7SNw=; b=PNGsYMUwJJ2PQyk6mVMqLnnsWWQFNWH/tADG8V335W4+9J4B9vTEwpXlFnPJczYYQz y7zUV0MJo2zG03H3tDpmqH98JoOaPPpDBmevkI6SU4HEvFUhWmx3CXLw+Y5pcz5PAQ1b D93khNAsNd6aQF7aLNJ4sGYyAhJm2Ehb91kvkEfMQowddje9dCg/STxi325wIyNzBX6G ufBMIXNITdyQcKmf/X7J7nDO2J6yok8Wt6zULCtqWiJwKJJ93cO5702il4GNQUuMwxzi vFbE6E1DCd1S1q79cLhM8CwUQutgyBRFE3Jp0bZBzwzFQNaSHZBoqHST/helZCofDKnV oVpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="b3d/3y1b"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w5-v6si2657296plq.112.2018.06.22.07.33.16; Fri, 22 Jun 2018 07:33:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="b3d/3y1b"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933279AbeFVOc3 (ORCPT + 99 others); Fri, 22 Jun 2018 10:32:29 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:44856 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751284AbeFVOc1 (ORCPT ); Fri, 22 Jun 2018 10:32:27 -0400 Received: by mail-lf0-f68.google.com with SMTP id j26-v6so1213669lfb.11; Fri, 22 Jun 2018 07:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=jNwA84yg/BOhiW3xZ9QbhqlEHW7VhpWObpOVS2P7SNw=; b=b3d/3y1bp9OFECWIuYFls16dEjXwsLPqEVYJsZ7huwNrMpY74xqxqpqtYgqzfS4Edk Vk9otnRpnnmAJQuQlpcXMp6VVxjcP++zm1dv58VdwEAADuGgcXOxRbmitrfxQHgaAJ1o 0VQbQEHxRPMR+nVOfDKfIo2Su9DN2+7+W1t6X3UofBUa5JGVEiNE0AhnmhQxsboo43lG JHXpvQ8Zb25YYieLbcw2mj62uwr0hUbRLOexmaXvQ1gB4FGqmx3tK6FYTjhjDjrdJ/SH OH4ZWHfJYndc56PuByjCTtVtLZUYI1LfIfsRhtaData77cqSXnra8jbehX1QEQmn9gN+ 4oZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=jNwA84yg/BOhiW3xZ9QbhqlEHW7VhpWObpOVS2P7SNw=; b=Rdu5KebLUkBN3cW2zxDHTj62ONYtCk+SnfpR9gp1YSgnGzjaOYZ10VCeJ80kna2ZFz y0P6/CQibZtrzIsdZ//lsknw/kWgqRdIYnARSgkuWHOCok9eLuugvARcmPx2dEihgDhu fHQ+WHAvodcStGtA2zXGSOhHZ8DJDXbETzKvNnXVB+bulU3uZF+jVvZ2X7g2KyLZj0D8 s0L8G6x5RID4GgtYkTsHTkC+zVK6IrgeoshMb1wzaDIEFFxruRiay/mTeyrdaw2t4Pa6 UJLZiX2+dB6KHsLWyqg4/bx5rRWMEsTLFX/7/y7iIb3sL9JcL4eoAjSXn/ztACipiMnx +o+w== X-Gm-Message-State: APt69E05xlnQzW78ywgdMz98XEdUmI89Ucw7FXnZW8T9hl2Fh1iwr5U0 mJPAeGVNbYdAFSgGahEAsvtxtfYljogeZH8gkq8= X-Received: by 2002:a2e:9ac4:: with SMTP id p4-v6mr1372074ljj.60.1529677945796; Fri, 22 Jun 2018 07:32:25 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:56c8:0:0:0:0:0 with HTTP; Fri, 22 Jun 2018 07:32:25 -0700 (PDT) In-Reply-To: <20180620224553.wfz6abuvvz4ul42d@eaf> References: <20180619160223.4108556-1-arnd@arndb.de> <20180619160223.4108556-3-arnd@arndb.de> <20180620224553.wfz6abuvvz4ul42d@eaf> From: Arnd Bergmann Date: Fri, 22 Jun 2018 16:32:25 +0200 X-Google-Sender-Auth: F7j9Zp69jEDnvj24KsHkljPfgvg Message-ID: Subject: Re: [PATCH 3/3] hfsplus: return inode birthtime for statx To: =?UTF-8?Q?Ernesto_A=2E_Fern=C3=A1ndez?= Cc: Al Viro , Andrew Morton , y2038 Mailman List , Vyacheslav Dubeyko , Deepa Dinamani , Jan Kara , Jeff Layton , Linux FS-devel Mailing List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 21, 2018 at 12:45 AM, Ernesto A. Fern=C3=A1ndez wrote: >> --- a/fs/hfsplus/inode.c >> +++ b/fs/hfsplus/inode.c >> @@ -276,6 +276,19 @@ static int hfsplus_setattr(struct dentry *dentry, s= truct iattr *attr) >> return 0; >> } >> >> +int hfsplus_getattr(const struct path *path, struct kstat *stat, >> + u32 request_mask, unsigned int query_flags) >> +{ >> + struct inode *inode =3D d_backing_inode(path->dentry); > > I think d_inode() is better. They work the same, but "normal filesystems > should not use this", according to the d_backing_inode() documentation. > Right, definitely. I copied it from vfs_getattr_nosec() without thinking ab= out it much. I see how David Howells put that d_backing_inode() there, but still don't understand it. >> @@ -335,6 +348,7 @@ int hfsplus_file_fsync(struct file *file, loff_t sta= rt, loff_t end, >> >> static const struct inode_operations hfsplus_file_inode_operations =3D = { >> .setattr =3D hfsplus_setattr, >> + .getattr =3D hfsplus_getattr, >> .listxattr =3D hfsplus_listxattr, >> #ifdef CONFIG_HFSPLUS_FS_POSIX_ACL >> .get_acl =3D hfsplus_get_posix_acl, >> -- >> 2.9.0 >> > > What about symlinks and special files? My mistake again, thanks for pointing that out. Doing the symlinks correctl= y here would actually add a bit more complexity as they use the generic page_symlink_inode_operations at the moment. I think I'd rather just retract this patch and let someone else handle it i= f they actually want this feature. I only added it because it seemed trivial to do, but that was clearly not true. ;-) Arnd