linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] coredump: fix dump_align() helper
@ 2013-12-11 12:00 Alexander Shishkin
  0 siblings, 0 replies; only message in thread
From: Alexander Shishkin @ 2013-12-11 12:00 UTC (permalink / raw)
  To: Alexander Viro; +Cc: linux-fsdevel, Alexander Shishkin

The recent rework that introduced dump_emit() and dump_align() breaks
existing core dump logic, which relies on these functions returning non
zero when everything is fine, but right now dump_align() returns 0 if
the current offset is already aligned on a given boundary.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
---
 fs/coredump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/coredump.c b/fs/coredump.c
index 62406b6..0be8c01 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -734,6 +734,6 @@ int dump_align(struct coredump_params *cprm, int align)
 	unsigned mod = cprm->written & (align - 1);
 	if (align & (align - 1))
 		return -EINVAL;
-	return mod ? dump_skip(cprm, align - mod) : 0;
+	return mod ? dump_skip(cprm, align - mod) : 1;
 }
 EXPORT_SYMBOL(dump_align);
-- 
1.8.5.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-12-11 12:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-11 12:00 [PATCH] coredump: fix dump_align() helper Alexander Shishkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).