[Ocfs2-tools-devel] [PATCH 1/1] fix segment fault of tunefs.ocfs2.

Sunil Mushran sunil.mushran at oracle.com
Fri Mar 25 14:14:48 PDT 2011


check it in. thanks

On 03/24/2011 11:35 PM, Tristan Ye wrote:
> ACK
>
> xiaowei.hu at oracle.com wrote:
>> 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;
>>   		}
>
> _______________________________________________
> Ocfs2-tools-devel mailing list
> Ocfs2-tools-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel




More information about the Ocfs2-tools-devel mailing list