UPSTREAM: ext4: make orphan functions be no-op in no-journal mode
authorAnatol Pomozov <anatol.pomozov@gmail.com>
Tue, 18 Sep 2012 17:38:59 +0000 (13:38 -0400)
committerChromeBot <chrome-bot@google.com>
Thu, 10 Jan 2013 21:56:28 +0000 (13:56 -0800)
commit56de6fae4110bbfd310d5f2b3bb7675abdbd2da1
tree73fce4306fe7a50cc012061b3553de7a99300d9c
parent0a962d62165755547e4802da837ca9004f5d246b
UPSTREAM: ext4: make orphan functions be no-op in no-journal mode

Instead of checking whether the handle is valid, we check if journal
is enabled. This avoids taking the s_orphan_lock mutex in all cases
when there is no journal in use, including the error paths where
ext4_orphan_del() is called with a handle set to NULL.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
BUG=chromium-os:37768
TEST=link build, manual test with corrupted filesystem image

(cherry picked from commit c9b92530a723ac5ef8e352885a1862b18f31b2f5)
Change-Id: I408cdaaa8872435f530a063bc84c3ca602e01b18
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41037
Reviewed-by: Olof Johansson <olofj@chromium.org>
fs/ext4/namei.c