]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit5fbb1a8b44af746de0c01b1095c1b77ec24600dc
treed1a550a378ffb0e77f02a15ff61b79f2f081d772
parent31f3e2b9899e88b545203041e802063659015906
scsi: sg: clean up gfp_mask in sg_build_indirect

commit b9b22c37710fe ("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