From 67e931e5b4667e7a852dca6c4e3ff6af1979f195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Goddard=20Rosa?= Date: Wed, 10 Mar 2010 15:21:22 -0800 Subject: [PATCH] --- yaml --- r: 187162 b: refs/heads/master c: 6e3e37a5a7c91045497553bcbd6a5faea98b21b3 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/coredump.h | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index b924743e6f17..332661b5ab52 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5cacdb4add1b1e50fe75edc50ebbb7bddd9cf5e7 +refs/heads/master: 6e3e37a5a7c91045497553bcbd6a5faea98b21b3 diff --git a/trunk/include/linux/coredump.h b/trunk/include/linux/coredump.h index b3c91d7cede4..8ba66a9d9022 100644 --- a/trunk/include/linux/coredump.h +++ b/trunk/include/linux/coredump.h @@ -16,6 +16,8 @@ static inline int dump_write(struct file *file, const void *addr, int nr) static inline int dump_seek(struct file *file, loff_t off) { + int ret = 1; + if (file->f_op->llseek && file->f_op->llseek != no_llseek) { if (file->f_op->llseek(file, off, SEEK_CUR) < 0) return 0; @@ -29,13 +31,15 @@ static inline int dump_seek(struct file *file, loff_t off) if (n > PAGE_SIZE) n = PAGE_SIZE; - if (!dump_write(file, buf, n)) - return 0; + if (!dump_write(file, buf, n)) { + ret = 0; + break; + } off -= n; } free_page((unsigned long)buf); } - return 1; + return ret; } #endif /* _LINUX_COREDUMP_H */