From 9d8f7ca30c45bd03f58f94ba873648d50f9ecdb3 Mon Sep 17 00:00:00 2001 From: Anton Altaparmakov Date: Mon, 19 Jan 2004 13:29:57 +0000 Subject: [PATCH] Fix minor bug in handling of compressed directories that fixes the erroneous "du" and "stat" output people reported. --- Documentation/filesystems/ntfs.txt | 3 +++ fs/ntfs/ChangeLog | 8 ++++++++ fs/ntfs/Makefile | 2 +- fs/ntfs/inode.c | 4 ++-- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Documentation/filesystems/ntfs.txt b/Documentation/filesystems/ntfs.txt index 8172fffb1667e..6f0d6b308472e 100644 --- a/Documentation/filesystems/ntfs.txt +++ b/Documentation/filesystems/ntfs.txt @@ -272,6 +272,9 @@ ChangeLog Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog. +2.1.6: + - Fix minor bug in handling of compressed directories that fixes the + erroneous "du" and "stat" output people reported. 2.1.5: - Minor bug fix in attribute list attribute handling that fixes the I/O errors on "ls" of certain fragmented files found by at least two diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog index f6fcaf5cbdfb5..1d6d389ff7dca 100644 --- a/fs/ntfs/ChangeLog +++ b/fs/ntfs/ChangeLog @@ -20,6 +20,14 @@ ToDo: sufficient for synchronisation here. We then just need to make sure ntfs_readpage/writepage/truncate interoperate properly with us. +2.1.6 - Fix minor bug in handling of compressed directories. + + - Fix bug in handling of compressed directories. A compressed + directory is not really compressed so when we set the ->i_blocks + field of a compressed directory inode we were setting it from the + non-existing field ni->itype.compressed.size which gave random + results... For directories we now always use ni->allocated_size. + 2.1.5 - Fix minor bug in attribute list attribute handling. - Fix bug in attribute list handling. Actually it is not as much a bug diff --git a/fs/ntfs/Makefile b/fs/ntfs/Makefile index b6fa3030ac3e8..1bfaa123f7cd1 100644 --- a/fs/ntfs/Makefile +++ b/fs/ntfs/Makefile @@ -5,7 +5,7 @@ obj-$(CONFIG_NTFS_FS) += ntfs.o ntfs-objs := aops.o attrib.o compress.o debug.o dir.o file.o inode.o mft.o \ mst.o namei.o super.o sysctl.o time.o unistr.o upcase.o -EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.5\" +EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.6\" ifeq ($(CONFIG_NTFS_DEBUG),y) EXTRA_CFLAGS += -DDEBUG diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c index fc1c2dbff040c..aef5c37ad5d9f 100644 --- a/fs/ntfs/inode.c +++ b/fs/ntfs/inode.c @@ -1,7 +1,7 @@ /** * inode.c - NTFS kernel inode handling. Part of the Linux-NTFS project. * - * Copyright (c) 2001-2003 Anton Altaparmakov + * Copyright (c) 2001-2004 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 @@ -1046,7 +1046,7 @@ no_data_attr_special_case: * sizes of all non-resident attributes present to give us the Linux * correct size that should go into i_blocks (after division by 512). */ - if (!NInoCompressed(ni)) + if (S_ISDIR(vi->i_mode) || !NInoCompressed(ni)) vi->i_blocks = ni->allocated_size >> 9; else vi->i_blocks = ni->itype.compressed.size >> 9; -- 2.53.0