[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120206173553.GB1135@infradead.org>
Date: Mon, 6 Feb 2012 12:35:53 -0500
From: Christoph Hellwig <hch@...radead.org>
To: Matthew Garrett <mjg@...hat.com>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
hch@...radead.org
Subject: Re: [PATCH V2 2/2] hfsplus: Add an ioctl to bless files
+#define HFSPLUS_IOC_BLESS _IO('f', 0x20)
I'd probably move this to fs.h and follow the numbering there,
otherwise we are bound to run into conflicts.
> +static int hfsplus_ioctl_bless(struct file *file, int __user *user_flags)
Care to add a little comment on what this ioctl does, bless is a bit
of a generic name.
> +{
> + struct inode *inode = file->f_dentry->d_inode;
Please use file->f_path.dentry instead of the f_dentry define, please.
Also given that we use the dentry almost as often I'd pull it into a
local variable as well.
> + mutex_lock(&sbi->vh_mutex);
> + vh->finder_info[0] = bvh->finder_info[0] =
> + cpu_to_be32(parent_ino(file->f_dentry));
> + vh->finder_info[1] = bvh->finder_info[1] = cpu_to_be32(inode->i_ino);
> + vh->finder_info[5] = bvh->finder_info[5] =
> + cpu_to_be32(parent_ino(file->f_dentry));
Any idea why we write the parent twice?
Not directly relevant, but where do you plan to put the userspace to
call this ioctl?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists