scsi: sg: clean up gfp_mask in sg_build_indirect
authorJeff Moyer <jmoyer@redhat.com>
Mon, 18 Jun 2018 13:57:12 +0000 (09:57 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 20 Jun 2018 02:02:25 +0000 (22:02 -0400)
commit5b9d397447f8c03843198b573d7cecf8893523fb
treed1a550a378ffb0e77f02a15ff61b79f2f081d772
parentb3a8aa90c46095cbad454eb068bfb5a8eb56d4e3
scsi: sg: clean up gfp_mask in sg_build_indirect

commit a45b599ad808c ("scsi: sg: allocate with __GFP_ZERO in
sg_build_indirect()") changed the call to alloc_pages to always use
__GFP_ZERO.  Just above that, though, there was this:

       if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
               gfp_mask |= __GFP_ZERO;

And there's only one user of the gfp_mask.  Just or in the __GFP_ZERO
flag at the top of the function and be done with it.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/sg.c