Re: [PATCH V2 2/2] hfsplus: Add an ioctl to bless files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



+#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-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux