From a4d7f34d0210344d2e25e5af1c2e61057422521d Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 11 Nov 2007 21:17:57 +0100 Subject: Revert "inotail.c: Decrement n_units before calling tail_pipe_from_begin" This reverts commit 21cddfba5f53ed0ad9d8f14bc1555c57cad9790e. Makes inotail -n +0 work again. Sometimes reducing code leads to unrecognised errors ;-) --- inotail.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'inotail.c') diff --git a/inotail.c b/inotail.c index 2eef622..483306e 100644 --- a/inotail.c +++ b/inotail.c @@ -244,6 +244,9 @@ static int tail_pipe_from_begin(struct file_struct *f, unsigned long n_units, co int bytes_read = 0; char buf[BUFSIZ]; + if (n_units) + n_units--; + while (n_units > 0) { if ((bytes_read = read(f->fd, buf, BUFSIZ)) <= 0) { if (bytes_read < 0 && (errno == EINTR || errno == EAGAIN)) @@ -292,7 +295,7 @@ static int tail_pipe_lines(struct file_struct *f, unsigned long n_lines) const char *p; if (from_begin) - return tail_pipe_from_begin(f, n_lines - 1, M_LINES); + return tail_pipe_from_begin(f, n_lines, M_LINES); if (n_lines == 0) return 0; @@ -400,7 +403,7 @@ static int tail_pipe_bytes(struct file_struct *f, unsigned long n_bytes) unsigned long i = 0; /* Index into buffer */ if (from_begin) - return tail_pipe_from_begin(f, n_bytes - 1, M_BYTES); + return tail_pipe_from_begin(f, n_bytes, M_BYTES); /* XXX: Needed? */ if (n_bytes == 0) -- cgit v1.2.3-54-g00ecf ingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/drivers/pci/access.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-02-17 14:35:19 +0000
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-05-11 12:01:09 -0700
commit511dd98ce8cf6dc4f8f2cb32a8af31ce9f4ba4a1 (patch)
tree2f95b0d3b64084bf66d605bd2aeecaa69f975122 /drivers/pci/access.c
parent52b265a12768b9a72679bec825eb82c784116464 (diff)
PCI: Convert pci_lock to raw_spinlock
pci_lock must be a real spinlock in preempt-rt. Convert it to raw_spinlock. No change for !RT kernels. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/access.c')
net/ipv4/netfilter/nf_conntrack_ipv4.ko \ net/ipv6/netfilter/nf_conntrack_ipv6.ko (builtin)|| sctp | ipv4 | ipv6 | nf_conntrack ---------++--------+--------+--------+-------------- none || 498243 | 828755 | 828676 | 6141434 SCTP || - | 829254 | 829175 | 6547872 Signed-off-by: Davide Caratti <dcaratti@redhat.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/netfilter/ipv4')