Re: [PATCH 02/19] sg: remove typedefs, type+formatting cleanup

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

 



On 5/24/19 11:47 AM, Douglas Gilbert wrote:
>  static int
>  sg_open(struct inode *inode, struct file *filp)
>  {
> -	int dev = iminor(inode);
> -	int flags = filp->f_flags;
> +	bool o_excl;
> +	int min_dev = iminor(inode);
> +	int op_flags = filp->f_flags;
>  	struct request_queue *q;
> -	Sg_device *sdp;
> -	Sg_fd *sfp;
> +	struct sg_device *sdp;
> +	struct sg_fd *sfp;
>  	int retval;
>  
>  	nonseekable_open(inode, filp);
> -	if ((flags & O_EXCL) && (O_RDONLY == (flags & O_ACCMODE)))
> +	o_excl = !!(op_flags & O_EXCL);
> +	if (o_excl && ((op_flags & O_ACCMODE) == O_RDONLY))
>  		return -EPERM; /* Can't lock it with read only access */

One change per patch please. The introduction of the o_excl variable is
not related to the removal of the typedefs. I think this patch should be
split.

Thanks,

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux