Re: [PATCH 01/19] vfs: Add inode uid,gid,mode initialization with helper function

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

 



On Wed, 17 Feb 2010, Dmitry Monakhov wrote:

> + */
> +inline void inode_init_owner(struct inode *inode, const struct inode *dir,
> +			int mode)
> +{

You should only try and inline functions which are smaller than about 100 
bytes or which have fewer than four lines of code.  Also, the compiler can 
generally figure out which functions to inline. 

> +	inode->i_uid = current_fsuid();
> +	if (dir && dir->i_mode & S_ISGID) {
> +		inode->i_gid = dir->i_gid;
> +		if (S_ISDIR(mode))
> +			mode |= S_ISGID;
> +	} else
> +		inode->i_gid = current_fsgid();
> +	inode->i_mode = mode;
> +}
> +EXPORT_SYMBOL(inode_init_owner);

The rest of them look ok to me, although probably best to get acks from 
each fs maintainer.


-- 
James Morris
<jmorris@xxxxxxxxx>
--
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