diff options
author | Artem B. Bityutskiy <dedekind@infradead.org> | 2005-09-30 09:59:17 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-11-06 17:01:48 -0500 |
commit | daba5cc4bcd025a9b4fd02a9117c71bfd400d811 (patch) | |
tree | da74b64b3bbd4ae215ced6d2d54abe7fdf83818e /fs/jffs2/os-linux.h | |
parent | 83a368380e172c1b2e9fd6ec2a62e457684adf0c (diff) |
[JFFS2] Fix dataflash support
- assume wbuf may be of size which is not power of 2
- don't make strange assumption about not padding wbuf for DataFlash
- use wbuf = DataFlash page and eraseblock >= 8 Dataflash pages
From: Peter Menzebach <pm-mtd@mw-itcon.de>
Acked-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jffs2/os-linux.h')
-rw-r--r-- | fs/jffs2/os-linux.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h index 48ad4202fbb1..04d4167ab252 100644 --- a/fs/jffs2/os-linux.h +++ b/fs/jffs2/os-linux.h | |||
@@ -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: os-linux.h,v 1.63 2005/09/21 11:55:21 dedekind Exp $ | 10 | * $Id: os-linux.h,v 1.64 2005/09/30 13:59:13 dedekind Exp $ |
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
@@ -65,8 +65,9 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f) | |||
65 | 65 | ||
66 | #define jffs2_is_readonly(c) (OFNI_BS_2SFFJ(c)->s_flags & MS_RDONLY) | 66 | #define jffs2_is_readonly(c) (OFNI_BS_2SFFJ(c)->s_flags & MS_RDONLY) |
67 | 67 | ||
68 | #define SECTOR_ADDR(x) ( (((unsigned long)(x) / c->sector_size) * c->sector_size) ) | ||
68 | #ifndef CONFIG_JFFS2_FS_WRITEBUFFER | 69 | #ifndef CONFIG_JFFS2_FS_WRITEBUFFER |
69 | #define SECTOR_ADDR(x) ( ((unsigned long)(x) & ~(c->sector_size-1)) ) | 70 | |
70 | 71 | ||
71 | #ifdef CONFIG_JFFS2_SUMMARY | 72 | #ifdef CONFIG_JFFS2_SUMMARY |
72 | #define jffs2_can_mark_obsolete(c) (0) | 73 | #define jffs2_can_mark_obsolete(c) (0) |
@@ -102,7 +103,6 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f) | |||
102 | #else /* NAND and/or ECC'd NOR support present */ | 103 | #else /* NAND and/or ECC'd NOR support present */ |
103 | 104 | ||
104 | #define jffs2_is_writebuffered(c) (c->wbuf != NULL) | 105 | #define jffs2_is_writebuffered(c) (c->wbuf != NULL) |
105 | #define SECTOR_ADDR(x) ( ((unsigned long)(x) / (unsigned long)(c->sector_size)) * c->sector_size ) | ||
106 | 106 | ||
107 | #ifdef CONFIG_JFFS2_SUMMARY | 107 | #ifdef CONFIG_JFFS2_SUMMARY |
108 | #define jffs2_can_mark_obsolete(c) (0) | 108 | #define jffs2_can_mark_obsolete(c) (0) |