[Ocfs2-tools-devel] [PATCH 1/1] fix segment fault of tunefs.ocfs2.
xiaowei.hu at oracle.com
xiaowei.hu at oracle.com
Thu Mar 24 22:48:42 PDT 2011
From: XiaoweiHu <xiaowei.hu at oracle.com>
When turn off sparse fs feature on a ocfs2 volume with tunefs.ocfs2,
it gives segment fault.This patch mean to fix that.Since there is the prog initialized
in function fill_sparse_files ,just pass it to truncate_to_i_size, instead of NULL.
Signed-off-by: XiaoweiHu <xiaowei.hu at oracle.com>
---
tunefs.ocfs2/feature_sparse_files.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tunefs.ocfs2/feature_sparse_files.c b/tunefs.ocfs2/feature_sparse_files.c
index 91dcbc9..8cbb37f 100644
--- a/tunefs.ocfs2/feature_sparse_files.c
+++ b/tunefs.ocfs2/feature_sparse_files.c
@@ -486,7 +486,7 @@ static errcode_t fill_sparse_files(ocfs2_filesys *fs,
break;
di = (struct ocfs2_dinode *)buf;
if (file->truncate) {
- ret = truncate_to_i_size(fs, di, NULL);
+ ret = truncate_to_i_size(fs, di, prog);
if (ret)
break;
}
--
1.7.0.4
More information about the Ocfs2-tools-devel
mailing list