summaryrefslogtreecommitdiffstats
path: root/fs/ntfs/attrib.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-06-25 17:04:55 +0100
committerAnton Altaparmakov <aia21@cantab.net>2005-06-25 17:04:55 +0100
commit1d58b27b8d77ecb816cfa8f846b78c845675eb89 (patch)
tree7c10e4182f87d00511aeb1d0583e3c09eeb807de /fs/ntfs/attrib.c
parent3bd1f4a173a3445f9919c21e775de2d8b9deacf8 (diff)
downloadtalos-obmc-linux-1d58b27b8d77ecb816cfa8f846b78c845675eb89.tar.gz
talos-obmc-linux-1d58b27b8d77ecb816cfa8f846b78c845675eb89.zip
NTFS: Change the runlist terminator of the newly allocated cluster(s) to
LCN_ENOENT in ntfs_attr_make_non_resident(). Otherwise the runlist code gets confused. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Diffstat (limited to 'fs/ntfs/attrib.c')
-rw-r--r--fs/ntfs/attrib.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c
index 104eedfb2507..34ea405b883d 100644
--- a/fs/ntfs/attrib.c
+++ b/fs/ntfs/attrib.c
@@ -1285,6 +1285,8 @@ int ntfs_attr_make_non_resident(ntfs_inode *ni)
new_size = (i_size_read(vi) + vol->cluster_size - 1) &
~(vol->cluster_size - 1);
if (new_size > 0) {
+ runlist_element *rl2;
+
/*
* Will need the page later and since the page lock nests
* outside all ntfs locks, we need to get the page now.
@@ -1304,6 +1306,12 @@ int ntfs_attr_make_non_resident(ntfs_inode *ni)
err);
goto page_err_out;
}
+ /* Change the runlist terminator to LCN_ENOENT. */
+ rl2 = rl;
+ while (rl2->length)
+ rl2++;
+ BUG_ON(rl2->lcn != LCN_RL_NOT_MAPPED);
+ rl2->lcn = LCN_ENOENT;
} else {
rl = NULL;
page = NULL;
OpenPOWER on IntegriCloud