linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Matthew Garrett <mjg@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	hch@infradead.org
Subject: Re: [PATCH V2 2/2] hfsplus: Add an ioctl to bless files
Date: Mon, 6 Feb 2012 12:35:53 -0500	[thread overview]
Message-ID: <20120206173553.GB1135@infradead.org> (raw)
In-Reply-To: <1328215191-4201-2-git-send-email-mjg@redhat.com>

+#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?

  reply	other threads:[~2012-02-06 17:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-02 20:39 [PATCH V2 1/2] hfsplus: Change finder_info to u32 Matthew Garrett
2012-02-02 20:39 ` [PATCH V2 2/2] hfsplus: Add an ioctl to bless files Matthew Garrett
2012-02-06 17:35   ` Christoph Hellwig [this message]
2012-02-06 17:45     ` Matthew Garrett
2012-02-06 17:49       ` Christoph Hellwig
2012-02-06 19:32         ` Matthew Garrett
2012-02-06 20:14         ` [PATCH V2] " Matthew Garrett
2012-02-07 13:25           ` Christoph Hellwig
2012-02-08  8:47           ` Henrik Rydberg
2012-02-06 17:31 ` [PATCH V2 1/2] hfsplus: Change finder_info to u32 Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120206173553.GB1135@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).