Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39054
b: refs/heads/master
c: 2d103d5
h: refs/heads/master
v: v3
  • Loading branch information
Melissa Howland authored and Martin Schwidefsky committed Oct 6, 2006
1 parent 332e1dc commit f5882b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d83682b3971d6707d6d668b3b62d416ab7dd1ab3
refs/heads/master: 2d103d5a80846e96e1cb1ba5e635e8c37d30ada8
10 changes: 5 additions & 5 deletions trunk/drivers/s390/char/monwriter.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#define MONWRITE_MAX_DATALEN 4024

static int mon_max_bufs = 255;
static int mon_buf_count;

struct mon_buf {
struct list_head list;
Expand All @@ -40,7 +41,6 @@ struct mon_private {
size_t hdr_to_read;
size_t data_to_read;
struct mon_buf *current_buf;
int mon_buf_count;
};

/*
Expand Down Expand Up @@ -99,13 +99,13 @@ static int monwrite_new_hdr(struct mon_private *monpriv)
rc = monwrite_diag(monhdr, monbuf->data,
APPLDATA_STOP_REC);
list_del(&monbuf->list);
monpriv->mon_buf_count--;
mon_buf_count--;
kfree(monbuf->data);
kfree(monbuf);
monbuf = NULL;
}
} else {
if (monpriv->mon_buf_count >= mon_max_bufs)
if (mon_buf_count >= mon_max_bufs)
return -ENOSPC;
monbuf = kzalloc(sizeof(struct mon_buf), GFP_KERNEL);
if (!monbuf)
Expand All @@ -118,7 +118,7 @@ static int monwrite_new_hdr(struct mon_private *monpriv)
}
monbuf->hdr = *monhdr;
list_add_tail(&monbuf->list, &monpriv->list);
monpriv->mon_buf_count++;
mon_buf_count++;
}
monpriv->current_buf = monbuf;
return 0;
Expand Down Expand Up @@ -186,7 +186,7 @@ static int monwrite_close(struct inode *inode, struct file *filp)
if (entry->hdr.mon_function != MONWRITE_GEN_EVENT)
monwrite_diag(&entry->hdr, entry->data,
APPLDATA_STOP_REC);
monpriv->mon_buf_count--;
mon_buf_count--;
list_del(&entry->list);
kfree(entry->data);
kfree(entry);
Expand Down

0 comments on commit f5882b3

Please sign in to comment.