From 48983d35d70395a391026c8f8bb1f44165ce058e Mon Sep 17 00:00:00 2001 From: kaloz Date: Fri, 30 May 2008 16:30:51 +0000 Subject: refresh generic 2.6.25 patches to match upstream style git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11296 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../patches-2.6.25/511-yaffs_2.6.25_fix.patch | 36 ++++++++++------------ 1 file changed, 17 insertions(+), 19 deletions(-) (limited to 'target/linux/generic-2.6/patches-2.6.25/511-yaffs_2.6.25_fix.patch') diff --git a/target/linux/generic-2.6/patches-2.6.25/511-yaffs_2.6.25_fix.patch b/target/linux/generic-2.6/patches-2.6.25/511-yaffs_2.6.25_fix.patch index 83db1b8a2..ac895342f 100644 --- a/target/linux/generic-2.6/patches-2.6.25/511-yaffs_2.6.25_fix.patch +++ b/target/linux/generic-2.6/patches-2.6.25/511-yaffs_2.6.25_fix.patch @@ -1,8 +1,6 @@ -Index: linux-2.6.25.4/fs/yaffs2/yaffs_fs.c -=================================================================== ---- linux-2.6.25.4.orig/fs/yaffs2/yaffs_fs.c -+++ linux-2.6.25.4/fs/yaffs2/yaffs_fs.c -@@ -181,7 +181,13 @@ static int yaffs_statfs(struct super_blo +--- a/fs/yaffs2/yaffs_fs.c ++++ b/fs/yaffs2/yaffs_fs.c +@@ -181,7 +181,13 @@ #else static int yaffs_statfs(struct super_block *sb, struct statfs *buf); #endif @@ -13,11 +11,11 @@ Index: linux-2.6.25.4/fs/yaffs2/yaffs_fs.c static void yaffs_read_inode(struct inode *inode); +#endif + - + static void yaffs_put_inode(struct inode *inode); static void yaffs_delete_inode(struct inode *); -@@ -284,7 +290,9 @@ static struct file_operations yaffs_dir_ - +@@ -284,7 +290,9 @@ + static struct super_operations yaffs_super_ops = { .statfs = yaffs_statfs, +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)) @@ -26,28 +24,28 @@ Index: linux-2.6.25.4/fs/yaffs2/yaffs_fs.c .put_inode = yaffs_put_inode, .put_super = yaffs_put_super, .delete_inode = yaffs_delete_inode, -@@ -844,11 +852,17 @@ struct inode *yaffs_get_inode(struct sup +@@ -844,11 +852,17 @@ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_get_inode for object %d\n", obj->objectId)); - + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) + inode = yaffs_iget(sb, obj->objectId); + if (IS_ERR(inode)) + return NULL; +#else inode = iget(sb, obj->objectId); - + /* NB Side effect: iget calls back to yaffs_read_inode(). */ /* iget also increments the inode's i_count */ /* NB You can't be holding grossLock or deadlock will happen! */ +#endif - + return inode; } -@@ -1427,6 +1441,39 @@ static int yaffs_sync_fs(struct super_bl +@@ -1427,6 +1441,39 @@ } - - + + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) +static struct inode *yaffs_iget(struct super_block *sb, unsigned long ino) +{ @@ -84,11 +82,11 @@ Index: linux-2.6.25.4/fs/yaffs2/yaffs_fs.c static void yaffs_read_inode(struct inode *inode) { /* NB This is called as a side effect of other functions, but -@@ -1448,6 +1495,7 @@ static void yaffs_read_inode(struct inod - +@@ -1448,6 +1495,7 @@ + yaffs_GrossUnlock(dev); } +#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) */ - + static LIST_HEAD(yaffs_dev_list); - + -- cgit v1.2.3