diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-07-17 16:20:25 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-07-17 16:20:25 +0000 |
commit | fb042825f857fb3851d00854ea7da095d26ea417 (patch) | |
tree | 3facc57670f7c529e3bd135792bc0f152e2995f1 /target/linux/generic-2.6/patches-2.6.29/210-mini_fo_2.6.25_fixes.patch | |
parent | 728cb5fb5827f84b91a09bfcd38507a35ac272bc (diff) |
get rid of linux 2.6.29
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16883 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic-2.6/patches-2.6.29/210-mini_fo_2.6.25_fixes.patch')
-rw-r--r-- | target/linux/generic-2.6/patches-2.6.29/210-mini_fo_2.6.25_fixes.patch | 143 |
1 files changed, 0 insertions, 143 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.29/210-mini_fo_2.6.25_fixes.patch b/target/linux/generic-2.6/patches-2.6.29/210-mini_fo_2.6.25_fixes.patch deleted file mode 100644 index d71e3b6fa..000000000 --- a/target/linux/generic-2.6/patches-2.6.29/210-mini_fo_2.6.25_fixes.patch +++ /dev/null @@ -1,143 +0,0 @@ ---- a/fs/mini_fo/main.c -+++ b/fs/mini_fo/main.c -@@ -79,6 +79,7 @@ mini_fo_tri_interpose(dentry_t *hidden_d - * of the new inode's fields - */ - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) - /* - * original: inode = iget(sb, hidden_inode->i_ino); - */ -@@ -87,6 +88,13 @@ mini_fo_tri_interpose(dentry_t *hidden_d - err = -EACCES; /* should be impossible??? */ - goto out; - } -+#else -+ inode = mini_fo_iget(sb, iunique(sb, 25)); -+ if (IS_ERR(inode)) { -+ err = PTR_ERR(inode); -+ goto out; -+ } -+#endif - - /* - * interpose the inode if not already interposed -@@ -184,9 +192,9 @@ mini_fo_parse_options(super_block_t *sb, - hidden_root = ERR_PTR(err); - goto out; - } -- hidden_root = nd.dentry; -- stopd(sb)->base_dir_dentry = nd.dentry; -- stopd(sb)->hidden_mnt = nd.mnt; -+ hidden_root = nd_get_dentry(&nd); -+ stopd(sb)->base_dir_dentry = nd_get_dentry(&nd); -+ stopd(sb)->hidden_mnt = nd_get_mnt(&nd); - - } else if(!strncmp("sto=", options, 4)) { - /* parse the storage dir */ -@@ -204,9 +212,9 @@ mini_fo_parse_options(super_block_t *sb, - hidden_root2 = ERR_PTR(err); - goto out; - } -- hidden_root2 = nd2.dentry; -- stopd(sb)->storage_dir_dentry = nd2.dentry; -- stopd(sb)->hidden_mnt2 = nd2.mnt; -+ hidden_root2 = nd_get_dentry(&nd2); -+ stopd(sb)->storage_dir_dentry = nd_get_dentry(&nd2); -+ stopd(sb)->hidden_mnt2 = nd_get_mnt(&nd2); - stohs2(sb) = hidden_root2->d_sb; - - /* validate storage dir, this is done in ---- a/fs/mini_fo/mini_fo.h -+++ b/fs/mini_fo/mini_fo.h -@@ -302,6 +302,10 @@ extern int mini_fo_tri_interpose(dentry_ - extern int mini_fo_cp_cont(dentry_t *tgt_dentry, struct vfsmount *tgt_mnt, - dentry_t *src_dentry, struct vfsmount *src_mnt); - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) -+extern struct inode *mini_fo_iget(struct super_block *sb, unsigned long ino); -+#endif -+ - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) - extern int mini_fo_create(inode_t *dir, dentry_t *dentry, int mode, struct nameidata *nd); - -@@ -501,6 +505,29 @@ static inline void double_unlock(struct - #endif /* if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) */ - #endif /* __KERNEL__ */ - -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) -+static inline dentry_t *nd_get_dentry(struct nameidata *nd) -+{ -+ return (nd->path.dentry); -+} -+ -+static inline struct vfsmount *nd_get_mnt(struct nameidata *nd) -+{ -+ return (nd->path.mnt); -+} -+#else -+static inline dentry_t *nd_get_dentry(struct nameidata *nd) -+{ -+ return (nd->dentry); -+} -+ -+static inline struct vfsmount *nd_get_mnt(struct nameidata *nd) -+{ -+ return (nd->mnt); -+} -+#endif -+ - /* - * Definitions for user and kernel code - */ ---- a/fs/mini_fo/super.c -+++ b/fs/mini_fo/super.c -@@ -262,10 +262,31 @@ mini_fo_umount_begin(super_block_t *sb) - } - #endif - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) -+struct inode * -+mini_fo_iget(struct super_block *sb, unsigned long ino) -+{ -+ struct inode *inode; -+ -+ inode = iget_locked(sb, ino); -+ if (!inode) -+ return ERR_PTR(-ENOMEM); -+ -+ if (!(inode->i_state & I_NEW)) -+ return inode; -+ -+ mini_fo_read_inode(inode); -+ -+ unlock_new_inode(inode); -+ return inode; -+} -+#endif /* if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) */ - - struct super_operations mini_fo_sops = - { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) - read_inode: mini_fo_read_inode, -+#endif - #if defined(FIST_DEBUG) || defined(FIST_FILTER_SCA) - write_inode: mini_fo_write_inode, - #endif /* defined(FIST_DEBUG) || defined(FIST_FILTER_SCA) */ ---- a/fs/mini_fo/aux.c -+++ b/fs/mini_fo/aux.c -@@ -164,11 +164,11 @@ dentry_t *bpath_walk(super_block_t *sb, - err = vfs_path_lookup(mnt->mnt_root, mnt, bpath+1, 0, &nd); - - /* validate */ -- if (err || !nd.dentry || !nd.dentry->d_inode) { -+ if (err || !nd_get_dentry(&nd) || !nd_get_dentry(&nd)->d_inode) { - printk(KERN_CRIT "mini_fo: bpath_walk: path_walk failed.\n"); - return NULL; - } -- return nd.dentry; -+ return nd_get_dentry(&nd); - } - - |