aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ntfs/layout.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/ntfs/layout.h b/fs/ntfs/layout.h
index d5491de6abf4..01f2dfa39cec 100644
--- a/fs/ntfs/layout.h
+++ b/fs/ntfs/layout.h
@@ -308,22 +308,19 @@ typedef le16 MFT_RECORD_FLAGS;
308 * The _LE versions are to be applied on little endian MFT_REFs. 308 * The _LE versions are to be applied on little endian MFT_REFs.
309 * Note: The _LE versions will return a CPU endian formatted value! 309 * Note: The _LE versions will return a CPU endian formatted value!
310 */ 310 */
311typedef enum { 311#define MFT_REF_MASK_CPU 0x0000ffffffffffffULL
312 MFT_REF_MASK_CPU = 0x0000ffffffffffffULL, 312#define MFT_REF_MASK_LE const_cpu_to_le64(0x0000ffffffffffffULL)
313 MFT_REF_MASK_LE = const_cpu_to_le64(0x0000ffffffffffffULL),
314} MFT_REF_CONSTS;
315 313
316typedef u64 MFT_REF; 314typedef u64 MFT_REF;
317typedef le64 leMFT_REF; 315typedef le64 leMFT_REF;
318 316
319#define MK_MREF(m, s) ((MFT_REF)(((MFT_REF)(s) << 48) | \ 317#define MK_MREF(m, s) ((MFT_REF)(((MFT_REF)(s) << 48) | \
320 ((MFT_REF)(m) & (u64)MFT_REF_MASK_CPU))) 318 ((MFT_REF)(m) & MFT_REF_MASK_CPU)))
321#define MK_LE_MREF(m, s) cpu_to_le64(MK_MREF(m, s)) 319#define MK_LE_MREF(m, s) cpu_to_le64(MK_MREF(m, s))
322 320
323#define MREF(x) ((unsigned long)((x) & (u64)MFT_REF_MASK_CPU)) 321#define MREF(x) ((unsigned long)((x) & MFT_REF_MASK_CPU))
324#define MSEQNO(x) ((u16)(((x) >> 48) & 0xffff)) 322#define MSEQNO(x) ((u16)(((x) >> 48) & 0xffff))
325#define MREF_LE(x) ((unsigned long)(le64_to_cpu(x) & \ 323#define MREF_LE(x) ((unsigned long)(le64_to_cpu(x) & MFT_REF_MASK_CPU))
326 (u64)MFT_REF_MASK_CPU))
327#define MSEQNO_LE(x) ((u16)((le64_to_cpu(x) >> 48) & 0xffff)) 324#define MSEQNO_LE(x) ((u16)((le64_to_cpu(x) >> 48) & 0xffff))
328 325
329#define IS_ERR_MREF(x) (((x) & 0x0000800000000000ULL) ? 1 : 0) 326#define IS_ERR_MREF(x) (((x) & 0x0000800000000000ULL) ? 1 : 0)