From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org,
Alexander Shishkin <alexander.shishkin@linux.intel.com>
Subject: [PATCH] coredump: fix dump_align() helper
Date: Wed, 11 Dec 2013 14:00:33 +0200 [thread overview]
Message-ID: <1386763233-21096-1-git-send-email-alexander.shishkin@linux.intel.com> (raw)
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
reply other threads:[~2013-12-11 12:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1386763233-21096-1-git-send-email-alexander.shishkin@linux.intel.com \
--to=alexander.shishkin@linux.intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).