All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Stornelli <marco.stornelli@gmail.com>
To: Matthew Garrett <mjg@redhat.com>
Cc: hch@infradead.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hfsplus: Fix bless ioctl when used with hardlinks
Date: Sat, 14 Apr 2012 14:03:19 +0200	[thread overview]
Message-ID: <4F896787.4050108@gmail.com> (raw)
In-Reply-To: <1334326014-15244-1-git-send-email-mjg@redhat.com>

Il 13/04/2012 16:06, Matthew Garrett ha scritto:
> HFS+ doesn't really implement hard links - instead, hardlinks are indicated
> by a magic file type which refers to an indirect node in a hidden
> directory. The spec indicates that stat() should return the inode number
> of the indirect node, but it turns out that this doesn't satisfy the
> firmware when it's looking for a bootloader - it wants the catalog ID of
> the hardlink file instead. Fix up this case.
>
> Signed-off-by: Matthew Garrett<mjg@redhat.com>
> ---
>   fs/hfsplus/ioctl.c |    9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/fs/hfsplus/ioctl.c b/fs/hfsplus/ioctl.c
> index c640ba5..5ee0681 100644
> --- a/fs/hfsplus/ioctl.c
> +++ b/fs/hfsplus/ioctl.c
> @@ -31,6 +31,7 @@ static int hfsplus_ioctl_bless(struct file *file, int __user *user_flags)
>   	struct hfsplus_sb_info *sbi = HFSPLUS_SB(inode->i_sb);
>   	struct hfsplus_vh *vh = sbi->s_vhdr;
>   	struct hfsplus_vh *bvh = sbi->s_backup_vhdr;
> +	int cnid = (u32)(unsigned long)dentry->d_fsdata;
>

Why a double cast?

Marco

      reply	other threads:[~2012-04-14 12:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-13 14:06 [PATCH] hfsplus: Fix bless ioctl when used with hardlinks Matthew Garrett
2012-04-14 12:03 ` Marco Stornelli [this message]

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=4F896787.4050108@gmail.com \
    --to=marco.stornelli@gmail.com \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.