Merge branch 'for-4.15/block' of git://git.kernel.dk/linux-block
[sfrench/cifs-2.6.git] / drivers / scsi / sg.c
index aa28874e8fb92f5090d64c9ceb9523fce224eabe..f098877eed4aa83fb4c1245e49b378a7699389d5 100644 (file)
@@ -217,7 +217,7 @@ static int sg_allow_access(struct file *filp, unsigned char *cmd)
        if (sfp->parentdp->device->type == TYPE_SCANNER)
                return 0;
 
-       return blk_verify_command(cmd, filp->f_mode & FMODE_WRITE);
+       return blk_verify_command(cmd, filp->f_mode);
 }
 
 static int