Re: [PATCH 04/11] vfs: add renameat2 syscall

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

 



Miklos Szeredi wrote:
> +
> +	if (flags)
> +		return -EOPNOTSUPP;
> +

If (at least for now) only ext4 interprets renameat2() flags,
I think adding a new member to "struct inode_operations" and
check it like

	if (!old_dir->i_op->swapname)
		return -EOPNOTSUPP;

or

	if (!(old_dir->i_op->supported_features & flags))
		return -EOPNOTSUPP;

earlier is smarter than scattering


	if (flags)
		return -EOPNOTSUPP;

into individual rename function.
If we do above change, LSM can omit checking permission for cross rename
operation which after all fails with -EOPNOTSUPP.
--
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