aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-09-19 04:38:41 -0400
committerAnton Altaparmakov <aia21@cantab.net>2005-09-19 04:38:41 -0400
commit4e64c88693fde1b1cbaa4cfecad43a0c3fad354e (patch)
tree6b616e513560d6064a30a3e235db22acc61b6efc /fs
parent5c9f6de3b80ca46000bd1b63d892820f9ee32138 (diff)
NTFS: Fix handling of compressed directories that I broke in earlier changeset.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Diffstat (limited to 'fs')
-rw-r--r--fs/ntfs/aops.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c
index b6cc8cf24626..5fd516f42eec 100644
--- a/fs/ntfs/aops.c
+++ b/fs/ntfs/aops.c
@@ -389,9 +389,11 @@ retry_readpage:
389 * Only $DATA attributes can be encrypted and only unnamed $DATA 389 * Only $DATA attributes can be encrypted and only unnamed $DATA
390 * attributes can be compressed. Index root can have the flags set but 390 * attributes can be compressed. Index root can have the flags set but
391 * this means to create compressed/encrypted files, not that the 391 * this means to create compressed/encrypted files, not that the
392 * attribute is compressed/encrypted. 392 * attribute is compressed/encrypted. Note we need to check for
393 * AT_INDEX_ALLOCATION since this is the type of both directory and
394 * index inodes.
393 */ 395 */
394 if (ni->type != AT_INDEX_ROOT) { 396 if (ni->type != AT_INDEX_ALLOCATION) {
395 /* If attribute is encrypted, deny access, just like NT4. */ 397 /* If attribute is encrypted, deny access, just like NT4. */
396 if (NInoEncrypted(ni)) { 398 if (NInoEncrypted(ni)) {
397 BUG_ON(ni->type != AT_DATA); 399 BUG_ON(ni->type != AT_DATA);
@@ -1341,9 +1343,11 @@ retry_writepage:
1341 * Only $DATA attributes can be encrypted and only unnamed $DATA 1343 * Only $DATA attributes can be encrypted and only unnamed $DATA
1342 * attributes can be compressed. Index root can have the flags set but 1344 * attributes can be compressed. Index root can have the flags set but
1343 * this means to create compressed/encrypted files, not that the 1345 * this means to create compressed/encrypted files, not that the
1344 * attribute is compressed/encrypted. 1346 * attribute is compressed/encrypted. Note we need to check for
1347 * AT_INDEX_ALLOCATION since this is the type of both directory and
1348 * index inodes.
1345 */ 1349 */
1346 if (ni->type != AT_INDEX_ROOT) { 1350 if (ni->type != AT_INDEX_ALLOCATION) {
1347 /* If file is encrypted, deny access, just like NT4. */ 1351 /* If file is encrypted, deny access, just like NT4. */
1348 if (NInoEncrypted(ni)) { 1352 if (NInoEncrypted(ni)) {
1349 unlock_page(page); 1353 unlock_page(page);