aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);