[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a1io5zfDwZXV771cw3AzVu-gK4Vs2UAh9U2pQA=dtN_yg@mail.gmail.com>
Date: Fri, 22 Jun 2018 16:32:25 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Ernesto A. Fernández
<ernesto.mnd.fernandez@...il.com>
Cc: Al Viro <viro@...iv.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
y2038 Mailman List <y2038@...ts.linaro.org>,
Vyacheslav Dubeyko <slava@...eyko.com>,
Deepa Dinamani <deepa.kernel@...il.com>,
Jan Kara <jack@...e.cz>, Jeff Layton <jlayton@...hat.com>,
Linux FS-devel Mailing List <linux-fsdevel@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] hfsplus: return inode birthtime for statx
On Thu, Jun 21, 2018 at 12:45 AM, Ernesto A. Fernández
<ernesto.mnd.fernandez@...il.com> wrote:
>> --- a/fs/hfsplus/inode.c
>> +++ b/fs/hfsplus/inode.c
>> @@ -276,6 +276,19 @@ static int hfsplus_setattr(struct dentry *dentry, struct iattr *attr)
>> return 0;
>> }
>>
>> +int hfsplus_getattr(const struct path *path, struct kstat *stat,
>> + u32 request_mask, unsigned int query_flags)
>> +{
>> + struct inode *inode = 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 about
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 start, loff_t end,
>>
>> static const struct inode_operations hfsplus_file_inode_operations = {
>> .setattr = hfsplus_setattr,
>> + .getattr = hfsplus_getattr,
>> .listxattr = hfsplus_listxattr,
>> #ifdef CONFIG_HFSPLUS_FS_POSIX_ACL
>> .get_acl = hfsplus_get_posix_acl,
>> --
>> 2.9.0
>>
>
> What about symlinks and special files?
My mistake again, thanks for pointing that out. Doing the symlinks correctly
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 if
they actually want this feature. I only added it because it seemed trivial
to do, but that was clearly not true. ;-)
Arnd
Powered by blists - more mailing lists