lkml.org 
[lkml]   [2013]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] jfs: Log shutdown error in jfs_freeze() function
Date
In function jfs_freeze() the log is shut down through lmLogShutdown() call.
When the "nointegrity" mount option is enabled, the log is actually not
initialized. As a result the freeze operation in that case brings to a
kernel OOPS.

The solution is to check if the "nointegrity" option is enabled and if it is not
then shut the log down.

May be this is not the best solution, but at least it fixes the OOPS.

Found by Linux File System Verification project (linuxtesting.org)

Signed-off-by: Vahram Martirosyan <vahram.martirosyan@linuxtesting.org>
---
fs/jfs/super.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/fs/jfs/super.c b/fs/jfs/super.c
index a3d424d..9788970 100644
--- a/fs/jfs/super.c
+++ b/fs/jfs/super.c
@@ -615,10 +615,12 @@ static int jfs_freeze(struct super_block *sb)

if (!(sb->s_flags & MS_RDONLY)) {
txQuiesce(sb);
- rc = lmLogShutdown(log);
- if (rc != 0) {
- jfs_err("lmLogShutdown failed with return code %d", rc);
- return rc;
+ if (!log->no_integrity) {
+ rc = lmLogShutdown(log);
+ if (rc != 0) {
+ jfs_err("lmLogShutdown failed with return code %d", rc);
+ return rc;
+ }
}
rc = updateSuper(sb, FM_CLEAN);
if (rc != 0) {
--
1.8.2.3


\
 
 \ /
  Last update: 2013-05-24 11:41    [W:0.334 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site