From: Michael Halcrow <mhalcrow@us.ibm.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, toml@us.ibm.com
Subject: [PATCH 2/7] eCryptfs: Collapse flag set into one statement
Date: Wed, 25 Jul 2007 15:50:19 -0500 [thread overview]
Message-ID: <20070725205019.GS14091@halcrow.austin.ibm.com> (raw)
In-Reply-To: <20070725204855.GQ14091@halcrow.austin.ibm.com>
Andrew Morton wrote:
> > + crypt_stat->flags |= ECRYPTFS_ENCRYPTED;
> > + crypt_stat->flags |= ECRYPTFS_KEY_VALID;
>
> Maybe the compiler can optimise those two statements, but we'd
> normally provide it with some manual help.
This patch provides the compiler with some manual help for
optimizing the setting of some flags.
Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
---
fs/ecryptfs/crypto.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
index 14cc1f5..76bba73 100644
--- a/fs/ecryptfs/crypto.c
+++ b/fs/ecryptfs/crypto.c
@@ -1029,8 +1029,7 @@ int ecryptfs_new_file_context(struct dentry *ecryptfs_dentry)
int rc = 0;
ecryptfs_set_default_crypt_stat_vals(crypt_stat, mount_crypt_stat);
- crypt_stat->flags |= ECRYPTFS_ENCRYPTED;
- crypt_stat->flags |= ECRYPTFS_KEY_VALID;
+ crypt_stat->flags |= (ECRYPTFS_ENCRYPTED | ECRYPTFS_KEY_VALID);
ecryptfs_copy_mount_wide_flags_to_inode_flags(crypt_stat,
mount_crypt_stat);
rc = ecryptfs_copy_mount_wide_sigs_to_inode_sigs(crypt_stat,
--
1.5.1.6
next prev parent reply other threads:[~2007-07-25 20:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-25 20:48 [PATCH 0/7] eCryptfs: Trivial updates Michael Halcrow
2007-07-25 20:49 ` [PATCH 1/7] eCryptfs: Remove unnecessary BUG_ON Michael Halcrow
2007-07-25 20:50 ` Michael Halcrow [this message]
2007-07-25 20:50 ` [PATCH 3/7] eCryptfs: Grammatical fix (destruct to destroy) Michael Halcrow
2007-07-25 20:51 ` [PATCH 4/7] eCryptfs: Comments for some structs Michael Halcrow
2007-07-25 22:59 ` Satyam Sharma
2007-07-25 20:52 ` [PATCH 5/7] eCryptfs: kerneldoc fixes for crypto.c and keystore.c Michael Halcrow
2007-07-25 20:52 ` [PATCH 6/7] eCryptfs: Remove unnecessary variable initializations Michael Halcrow
2007-07-25 20:53 ` [PATCH 7/7] eCryptfs: Make needlessly global symbols static Michael Halcrow
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=20070725205019.GS14091@halcrow.austin.ibm.com \
--to=mhalcrow@us.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=toml@us.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®