From: Edward Shishkin <edward@namesys.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Vladimir V. Saveliev" <vs@namesys.com>,
ReiserFS Mailing List <reiserfs-devel@vger.kernel.org>
Subject: [PATCH] reiser4: cryptcompress misc fixups-2
Date: Sun, 12 Aug 2007 00:02:38 +0400 [thread overview]
Message-ID: <46BE15DE.7080304@namesys.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2 bytes --]
[-- Attachment #2: reiser4-cryptcompress-misc-fixups-2.patch --]
[-- Type: text/x-patch, Size: 1414 bytes --]
Check a file plugin id before manipulating
with plugin-specific counter.
Signed-off-by: Edward Shishkin <edward@namesys.com>
---
linux-2.6.23-rc1-mm1/fs/reiser4/plugin/file/cryptcompress.h | 18 ++++++++++--
1 files changed, 15 insertions(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1/fs/reiser4/plugin/file/cryptcompress.h.orig
+++ linux-2.6.23-rc1-mm1/fs/reiser4/plugin/file/cryptcompress.h
@@ -38,11 +38,23 @@
#if REISER4_DEBUG
#define INODE_PGCOUNT(inode) \
- (atomic_read(&cryptcompress_inode_data(inode)->pgcount))
+({ \
+ assert("edward-1530", inode_file_plugin(inode) == \
+ file_plugin_by_id(CRYPTCOMPRESS_FILE_PLUGIN_ID)); \
+ atomic_read(&cryptcompress_inode_data(inode)->pgcount); \
+ })
#define INODE_PGCOUNT_INC(inode) \
- (atomic_inc(&cryptcompress_inode_data(inode)->pgcount))
+do { \
+ assert("edward-1531", inode_file_plugin(inode) == \
+ file_plugin_by_id(CRYPTCOMPRESS_FILE_PLUGIN_ID)); \
+ atomic_inc(&cryptcompress_inode_data(inode)->pgcount); \
+} while (0)
#define INODE_PGCOUNT_DEC(inode) \
- (atomic_dec(&cryptcompress_inode_data(inode)->pgcount))
+do { \
+ if (inode_file_plugin(inode) == \
+ file_plugin_by_id(CRYPTCOMPRESS_FILE_PLUGIN_ID)) \
+ atomic_dec(&cryptcompress_inode_data(inode)->pgcount); \
+} while (0)
#else
#define INODE_PGCOUNT(inode) (0)
#define INODE_PGCOUNT_INC(inode)
reply other threads:[~2007-08-11 20:02 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=46BE15DE.7080304@namesys.com \
--to=edward@namesys.com \
--cc=akpm@linux-foundation.org \
--cc=reiserfs-devel@vger.kernel.org \
--cc=vs@namesys.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.