aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/dir.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2005-07-06 08:13:13 -0400
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-07-06 10:12:09 -0400
commit265489f01d8c05f7aae174651a98854af090efc0 (patch)
tree3d543da813f26f5637194b4a10b5c253be1dfc9c /fs/jffs2/dir.c
parent9dee7503ce3fc38911b9873216619190cf688128 (diff)
[JFFS2] Remove compatibilty cruft for ancient kernels
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jffs2/dir.c')
-rw-r--r--fs/jffs2/dir.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c
index 6421be874ce3..3ca0d25eef1d 100644
--- a/fs/jffs2/dir.c
+++ b/fs/jffs2/dir.c
@@ -7,7 +7,7 @@
7 * 7 *
8 * For licensing information, see the file 'LICENCE' in this directory. 8 * For licensing information, see the file 'LICENCE' in this directory.
9 * 9 *
10 * $Id: dir.c,v 1.85 2005/03/01 10:34:03 dedekind Exp $ 10 * $Id: dir.c,v 1.86 2005/07/06 12:13:09 dwmw2 Exp $
11 * 11 *
12 */ 12 */
13 13
@@ -22,16 +22,6 @@
22#include <linux/time.h> 22#include <linux/time.h>
23#include "nodelist.h" 23#include "nodelist.h"
24 24
25/* Urgh. Please tell me there's a nicer way of doing these. */
26#include <linux/version.h>
27#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,48)
28typedef int mknod_arg_t;
29#define NAMEI_COMPAT(x) ((void *)x)
30#else
31typedef dev_t mknod_arg_t;
32#define NAMEI_COMPAT(x) (x)
33#endif
34
35static int jffs2_readdir (struct file *, void *, filldir_t); 25static int jffs2_readdir (struct file *, void *, filldir_t);
36 26
37static int jffs2_create (struct inode *,struct dentry *,int, 27static int jffs2_create (struct inode *,struct dentry *,int,
@@ -43,7 +33,7 @@ static int jffs2_unlink (struct inode *,struct dentry *);
43static int jffs2_symlink (struct inode *,struct dentry *,const char *); 33static int jffs2_symlink (struct inode *,struct dentry *,const char *);
44static int jffs2_mkdir (struct inode *,struct dentry *,int); 34static int jffs2_mkdir (struct inode *,struct dentry *,int);
45static int jffs2_rmdir (struct inode *,struct dentry *); 35static int jffs2_rmdir (struct inode *,struct dentry *);
46static int jffs2_mknod (struct inode *,struct dentry *,int,mknod_arg_t); 36static int jffs2_mknod (struct inode *,struct dentry *,int,dev_t);
47static int jffs2_rename (struct inode *, struct dentry *, 37static int jffs2_rename (struct inode *, struct dentry *,
48 struct inode *, struct dentry *); 38 struct inode *, struct dentry *);
49 39
@@ -58,8 +48,8 @@ struct file_operations jffs2_dir_operations =
58 48
59struct inode_operations jffs2_dir_inode_operations = 49struct inode_operations jffs2_dir_inode_operations =
60{ 50{
61 .create = NAMEI_COMPAT(jffs2_create), 51 .create = jffs2_create,
62 .lookup = NAMEI_COMPAT(jffs2_lookup), 52 .lookup = jffs2_lookup,
63 .link = jffs2_link, 53 .link = jffs2_link,
64 .unlink = jffs2_unlink, 54 .unlink = jffs2_unlink,
65 .symlink = jffs2_symlink, 55 .symlink = jffs2_symlink,
@@ -578,7 +568,7 @@ static int jffs2_rmdir (struct inode *dir_i, struct dentry *dentry)
578 return ret; 568 return ret;
579} 569}
580 570
581static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, mknod_arg_t rdev) 571static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, dev_t rdev)
582{ 572{
583 struct jffs2_inode_info *f, *dir_f; 573 struct jffs2_inode_info *f, *dir_f;
584 struct jffs2_sb_info *c; 574 struct jffs2_sb_info *c;