aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nilfs2/ioctl.c1
-rw-r--r--include/linux/nilfs2_fs.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c
index d89173edd7fe..5471eed5eccb 100644
--- a/fs/nilfs2/ioctl.c
+++ b/fs/nilfs2/ioctl.c
@@ -28,6 +28,7 @@
28#include <linux/vmalloc.h> 28#include <linux/vmalloc.h>
29#include <linux/compat.h> /* compat_ptr() */ 29#include <linux/compat.h> /* compat_ptr() */
30#include <linux/mount.h> /* mnt_want_write(), mnt_drop_write() */ 30#include <linux/mount.h> /* mnt_want_write(), mnt_drop_write() */
31#include <linux/buffer_head.h>
31#include <linux/nilfs2_fs.h> 32#include <linux/nilfs2_fs.h>
32#include "nilfs.h" 33#include "nilfs.h"
33#include "segment.h" 34#include "segment.h"
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h
index fdcd1bc7f61f..3a65e5aa2d76 100644
--- a/include/linux/nilfs2_fs.h
+++ b/include/linux/nilfs2_fs.h
@@ -326,17 +326,21 @@ static inline unsigned nilfs_rec_len_from_disk(__le16 dlen)
326{ 326{
327 unsigned len = le16_to_cpu(dlen); 327 unsigned len = le16_to_cpu(dlen);
328 328
329#if !defined(__KERNEL__) || (PAGE_CACHE_SIZE >= 65536)
329 if (len == NILFS_MAX_REC_LEN) 330 if (len == NILFS_MAX_REC_LEN)
330 return 1 << 16; 331 return 1 << 16;
332#endif
331 return len; 333 return len;
332} 334}
333 335
334static inline __le16 nilfs_rec_len_to_disk(unsigned len) 336static inline __le16 nilfs_rec_len_to_disk(unsigned len)
335{ 337{
338#if !defined(__KERNEL__) || (PAGE_CACHE_SIZE >= 65536)
336 if (len == (1 << 16)) 339 if (len == (1 << 16))
337 return cpu_to_le16(NILFS_MAX_REC_LEN); 340 return cpu_to_le16(NILFS_MAX_REC_LEN);
338 else if (len > (1 << 16)) 341 else if (len > (1 << 16))
339 BUG(); 342 BUG();
343#endif
340 return cpu_to_le16(len); 344 return cpu_to_le16(len);
341} 345}
342 346