Skip to content

Commit

Permalink
Add FILEID_INVALID macro
Browse files Browse the repository at this point in the history
FILEID_INVALID macro doesn't exist in kernel 3.7 and earlier.  This
adds it to allow build on the earlier kernels.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
  • Loading branch information
konis committed Jun 7, 2015
1 parent ae7f72a commit 315bf7e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fs/nilfs2/kern_feature.h
Expand Up @@ -137,6 +137,13 @@
# define HAVE_WAIT_FOR_STABLE_PAGE \
(LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0))
#endif
/*
* FILEID_INVALID was introduced in kernel 3.8
*/
#ifndef HAVE_FILEID_INVALID
# define HAVE_FILEID_INVALID \
(LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
#endif
#endif /* LINUX_VERSION_CODE */


Expand Down Expand Up @@ -226,4 +233,8 @@ static inline void wait_for_stable_page(struct page *page)
}
#endif

#if !HAVE_FILEID_INVALID
# define FILEID_INVALID 0xff
#endif

#endif /* NILFS_KERN_FEATURE_H */
1 change: 1 addition & 0 deletions fs/nilfs2/namei.c
Expand Up @@ -39,6 +39,7 @@
*/

#include <linux/pagemap.h>
#include "kern_feature.h"
#include "nilfs.h"
#include "export.h"

Expand Down

0 comments on commit 315bf7e

Please sign in to comment.