|
@@ -326,17 +326,21 @@ static inline unsigned nilfs_rec_len_from_disk(__le16 dlen)
|
|
{
|
|
{
|
|
unsigned len = le16_to_cpu(dlen);
|
|
unsigned len = le16_to_cpu(dlen);
|
|
|
|
|
|
|
|
+#if !defined(__KERNEL__) || (PAGE_CACHE_SIZE >= 65536)
|
|
if (len == NILFS_MAX_REC_LEN)
|
|
if (len == NILFS_MAX_REC_LEN)
|
|
return 1 << 16;
|
|
return 1 << 16;
|
|
|
|
+#endif
|
|
return len;
|
|
return len;
|
|
}
|
|
}
|
|
|
|
|
|
static inline __le16 nilfs_rec_len_to_disk(unsigned len)
|
|
static inline __le16 nilfs_rec_len_to_disk(unsigned len)
|
|
{
|
|
{
|
|
|
|
+#if !defined(__KERNEL__) || (PAGE_CACHE_SIZE >= 65536)
|
|
if (len == (1 << 16))
|
|
if (len == (1 << 16))
|
|
return cpu_to_le16(NILFS_MAX_REC_LEN);
|
|
return cpu_to_le16(NILFS_MAX_REC_LEN);
|
|
else if (len > (1 << 16))
|
|
else if (len > (1 << 16))
|
|
BUG();
|
|
BUG();
|
|
|
|
+#endif
|
|
return cpu_to_le16(len);
|
|
return cpu_to_le16(len);
|
|
}
|
|
}
|
|
|
|
|