summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_proc.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-03-31 19:50:52 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2013-04-09 20:13:30 +0200
commit859d22f9c3924ab87b05ded8ba922abc298c1d43 (patch)
treed84bf780f731173977d41f6086e428e50ce4268f /drivers/scsi/scsi_proc.c
parentnew helper: single_open_size() (diff)
downloadlinux-859d22f9c3924ab87b05ded8ba922abc298c1d43.tar.xz
linux-859d22f9c3924ab87b05ded8ba922abc298c1d43.zip
scsi_proc: make proc_scsi_host_open() preallocate a bigger buffer
Some of the ->show_info() instances really spew a lot; it's not a problem wrt correctness (seq_read() will grow buffer and call the sucker again), but in this case it makes sense to start with a somewhat bigger one - they often do exceed one page worth of output. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to '')
-rw-r--r--drivers/scsi/scsi_proc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c
index 1670ba7ad6af..1eb34c34d7b9 100644
--- a/drivers/scsi/scsi_proc.c
+++ b/drivers/scsi/scsi_proc.c
@@ -78,7 +78,8 @@ static int proc_scsi_show(struct seq_file *m, void *v)
static int proc_scsi_host_open(struct inode *inode, struct file *file)
{
- return single_open(file, proc_scsi_show, PDE(inode)->data);
+ return single_open_size(file, proc_scsi_show, PDE(inode)->data,
+ 4 * PAGE_SIZE);
}
static const struct file_operations proc_scsi_fops = {