Re: [PATCH] fs: use the switch statement in init_special_inode()

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

 



On Tue 09-09-25 09:54:58, Mateusz Guzik wrote:
> Similar to may_open().
> 
> No functional changes.
> 
> Signed-off-by: Mateusz Guzik <mjguzik@xxxxxxxxx>

Looks sane. Just one style nit below. Feel free to add:

Reviewed-by: Jan Kara <jack@xxxxxxx>

> -	else if (S_ISSOCK(mode))
> -		;	/* leave it no_open_fops */
> -	else
> +		break;
> +	case S_IFSOCK:
> +		/* leave it no_open_fops */
> +		break;
> +	default:
>  		printk(KERN_DEBUG "init_special_inode: bogus i_mode (%o) for"
>  				  " inode %s:%lu\n", mode, inode->i_sb->s_id,
>  				  inode->i_ino);
> +		break;

We usually don't bother with 'break' for the 'default' label.

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR




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

  Powered by Linux