aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-06-19 15:15:53 -0400
committerJiri Kosina <jkosina@suse.cz>2013-08-20 07:06:40 -0400
commit8be04b9374e59923fa337766aaa74151b95b7099 (patch)
tree7491f7f6a9ebeb9f78ed41a94591ffd70e99b870 /drivers/scsi
parent85dbe706074c8b9091a3bc5f24eff02a044701c3 (diff)
treewide: Add __GFP_NOWARN to k.alloc calls with v.alloc fallbacks
Don't emit OOM warnings when k.alloc calls fail when there there is a v.alloc immediately afterwards. Converted a kmalloc/vmalloc with memset to kzalloc/vzalloc. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/cxgbi/libcxgbi.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/cxgbi/libcxgbi.h b/drivers/scsi/cxgbi/libcxgbi.h
index 80fa99b3d384..8135f04671af 100644
--- a/drivers/scsi/cxgbi/libcxgbi.h
+++ b/drivers/scsi/cxgbi/libcxgbi.h
@@ -658,11 +658,11 @@ static inline u32 cxgbi_tag_nonrsvd_bits(struct cxgbi_tag_format *tformat,
658static inline void *cxgbi_alloc_big_mem(unsigned int size, 658static inline void *cxgbi_alloc_big_mem(unsigned int size,
659 gfp_t gfp) 659 gfp_t gfp)
660{ 660{
661 void *p = kmalloc(size, gfp); 661 void *p = kzalloc(size, gfp | __GFP_NOWARN);
662
662 if (!p) 663 if (!p)
663 p = vmalloc(size); 664 p = vzalloc(size);
664 if (p) 665
665 memset(p, 0, size);
666 return p; 666 return p;
667} 667}
668 668