From 0ade70cd66ecb21abeef160b97c62019b607cefc Mon Sep 17 00:00:00 2001 From: Anton Altaparmakov Date: Thu, 23 Mar 2006 14:57:43 +0000 Subject: [PATCH] --- yaml --- r: 23335 b: refs/heads/master c: 67b1dfe77a2eb2a88b37cd77b8979cbdb7695bd6 h: refs/heads/master i: 23333: 4f6bd49875274898cb252978d07e3947aaed9cc4 23331: f745099e62b2b4b5169bde760c804f5f55420f15 23327: 7a2547e64a6bdb20f3e372d11cd2582a3c7f2f9c v: v3 --- [refs] | 2 +- trunk/fs/ntfs/ChangeLog | 6 ++++++ trunk/fs/ntfs/Makefile | 2 +- trunk/fs/ntfs/namei.c | 2 +- trunk/fs/ntfs/runlist.c | 12 ++++++++---- trunk/fs/ntfs/super.c | 2 +- 6 files changed, 18 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 3662fbf8b262..14f083754643 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b4d8d1a93c6ea042b29bb66fbb1cf6bc556c18f7 +refs/heads/master: 67b1dfe77a2eb2a88b37cd77b8979cbdb7695bd6 diff --git a/trunk/fs/ntfs/ChangeLog b/trunk/fs/ntfs/ChangeLog index 9d8ffa89e2c2..3d8d60be48de 100644 --- a/trunk/fs/ntfs/ChangeLog +++ b/trunk/fs/ntfs/ChangeLog @@ -19,6 +19,12 @@ ToDo/Notes: - Enable the code for setting the NT4 compatibility flag when we start making NTFS 1.2 specific modifications. +2.1.27 - Various bug fixes. + + - Fix two compiler warnings on Alpha. Thanks to Andrew Morton for + reporting them. + - Fix an (innocent) off-by-one error in the runlist code. + 2.1.26 - Minor bug fixes and updates. - Fix a potential overflow in file.c where a cast to s64 was missing in diff --git a/trunk/fs/ntfs/Makefile b/trunk/fs/ntfs/Makefile index d95fac7fdeb6..e27b4eacffbf 100644 --- a/trunk/fs/ntfs/Makefile +++ b/trunk/fs/ntfs/Makefile @@ -6,7 +6,7 @@ ntfs-objs := aops.o attrib.o collate.o compress.o debug.o dir.o file.o \ index.o inode.o mft.o mst.o namei.o runlist.o super.o sysctl.o \ unistr.o upcase.o -EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.26\" +EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.27\" ifeq ($(CONFIG_NTFS_DEBUG),y) EXTRA_CFLAGS += -DDEBUG diff --git a/trunk/fs/ntfs/namei.c b/trunk/fs/ntfs/namei.c index 5ea9eb93af62..78e0cf738e24 100644 --- a/trunk/fs/ntfs/namei.c +++ b/trunk/fs/ntfs/namei.c @@ -2,7 +2,7 @@ * namei.c - NTFS kernel directory inode operations. Part of the Linux-NTFS * project. * - * Copyright (c) 2001-2004 Anton Altaparmakov + * Copyright (c) 2001-2006 Anton Altaparmakov * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published diff --git a/trunk/fs/ntfs/runlist.c b/trunk/fs/ntfs/runlist.c index 061b5ff6b73c..eb52b801512b 100644 --- a/trunk/fs/ntfs/runlist.c +++ b/trunk/fs/ntfs/runlist.c @@ -381,6 +381,7 @@ static inline runlist_element *ntfs_rl_insert(runlist_element *dst, static inline runlist_element *ntfs_rl_replace(runlist_element *dst, int dsize, runlist_element *src, int ssize, int loc) { + signed delta; BOOL left = FALSE; /* Left end of @src needs merging. */ BOOL right = FALSE; /* Right end of @src needs merging. */ int tail; /* Start of tail of @dst. */ @@ -396,11 +397,14 @@ static inline runlist_element *ntfs_rl_replace(runlist_element *dst, left = ntfs_are_rl_mergeable(dst + loc - 1, src); /* * Allocate some space. We will need less if the left, right, or both - * ends get merged. + * ends get merged. The -1 accounts for the run being replaced. */ - dst = ntfs_rl_realloc(dst, dsize, dsize + ssize - left - right); - if (IS_ERR(dst)) - return dst; + delta = ssize - 1 - left - right; + if (delta > 0) { + dst = ntfs_rl_realloc(dst, dsize, dsize + delta); + if (IS_ERR(dst)) + return dst; + } /* * We are guaranteed to succeed from here so can start modifying the * original runlists. diff --git a/trunk/fs/ntfs/super.c b/trunk/fs/ntfs/super.c index 368a8ec10668..71c58eca580e 100644 --- a/trunk/fs/ntfs/super.c +++ b/trunk/fs/ntfs/super.c @@ -3234,7 +3234,7 @@ static void __exit exit_ntfs_fs(void) } MODULE_AUTHOR("Anton Altaparmakov "); -MODULE_DESCRIPTION("NTFS 1.2/3.x driver - Copyright (c) 2001-2005 Anton Altaparmakov"); +MODULE_DESCRIPTION("NTFS 1.2/3.x driver - Copyright (c) 2001-2006 Anton Altaparmakov"); MODULE_VERSION(NTFS_VERSION); MODULE_LICENSE("GPL"); #ifdef DEBUG