mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 05:04:02 +02:00
ntfs: preserve RECALL_ON_OPEN on WSL special-file reparse points
When creating a WSL special file (socket, fifo, character or block
device), __ntfs_create() sets FILE_ATTRIBUTE_RECALL_ON_OPEN in ni->flags
as valid_reparse_data() requires for these tags. This flag is
intentionally absent from $FILE_NAME, so the subsequent reload
ni->flags = fn->file_attributes;
drops it from ni->flags, the authoritative copy written back to
$STANDARD_INFORMATION. The on-disk file_attributes becomes 0x00000404
instead of 0x00040404, and after a remount valid_reparse_data() rejects
the reparse point while fsck reports "$REPARSE_POINT data is corrupted".
Preserve the RECALL_ON_OPEN bit across the reload. Symlinks do not set
that bit, so they are unaffected.
Fixes: af0db57d42 ("ntfs: update inode operations")
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
parent
dd3210c47e
commit
523307b851
|
|
@ -685,7 +685,8 @@ static struct ntfs_inode *__ntfs_create(struct mnt_idmap *idmap, struct inode *d
|
|||
mutex_unlock(&dir_ni->mrec_lock);
|
||||
mutex_unlock(&ni->mrec_lock);
|
||||
|
||||
ni->flags = fn->file_attributes;
|
||||
ni->flags = fn->file_attributes |
|
||||
(ni->flags & FILE_ATTRIBUTE_RECALL_ON_OPEN);
|
||||
/* Set the sequence number. */
|
||||
vi->i_generation = ni->seq_no;
|
||||
set_nlink(vi, 1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user