Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=kernel2625.git;a=commitdiff;h=a1fcd63144922a24f3e1391e0732dfb3aa87a75e

commit a1fcd63144922a24f3e1391e0732dfb3aa87a75e
Author: Miklos Vajna <[EMAIL PROTECTED]>
Date:   Tue Apr 22 15:11:53 2008 +0200

redirfs-0.2-6-i686
- add patch to build with kernel>=2.6.25

diff --git a/source/apps-extra/redirfs/FrugalBuild 
b/source/apps-extra/redirfs/FrugalBuild
index 2e66830..e9fca7f 100644
--- a/source/apps-extra/redirfs/FrugalBuild
+++ b/source/apps-extra/redirfs/FrugalBuild
@@ -3,7 +3,7 @@

pkgname=redirfs
pkgver=0.2
-pkgrel=5
+pkgrel=6
pkgdesc="Redirecting FileSystem"
url="http://redirfs.org/";
_F_kernelmod_scriptlet=$pkgname.install
@@ -11,11 +11,13 @@ Finclude kernel-module
groups=('apps-extra')
archs=('i686' 'x86_64')
up2date="lynx -dump 
http://redirfs.org/tiki-index.php?page=redirfs_download|grep -m1 gz$|Flasttar"
-source=(http://www.redirfs.org/packages/redirfs-$pkgver.tar.gz)
-sha1sums=('c736b6a9b9cb0540010eb865febfd4f3b1fe6d82')
+source=(http://www.redirfs.org/packages/redirfs-$pkgver.tar.gz 
redirfs-0.2-2.6.25.patch)
+sha1sums=('c736b6a9b9cb0540010eb865febfd4f3b1fe6d82' \
+          '63c510b866b660b6aa7e9d07814b43ea8921743a')

build()
{
+       Fpatchall
# no Fcheckkernel, crosscompilation verified
Fsed 'uname -r' "echo $_F_kernelmod_uname" Makefile
Fmake
diff --git a/source/apps-extra/redirfs/redirfs-0.2-2.6.25.patch 
b/source/apps-extra/redirfs/redirfs-0.2-2.6.25.patch
new file mode 100644
index 0000000..25740be
--- /dev/null
+++ b/source/apps-extra/redirfs/redirfs-0.2-2.6.25.patch
@@ -0,0 +1,789 @@
+--- filter.c
++++ filter.c   2008/03/12 15:25:46
+@@ -4,7 +4,8 @@
+ static LIST_HEAD(flt_list);
+ extern struct list_head path_rem_list;
+ extern struct mutex path_list_mutex;
+-extern struct kset rfs_flt_kset;
++extern struct kset *rfs_flt_kset;
++extern struct kobj_type rfs_flt_type;
+
+ struct filter *flt_get(struct filter *flt)
+ {
+@@ -78,9 +79,8 @@
+       else
+               atomic_set(&flt->f_active, 0);
+
+-      flt->f_kobj.kset = &rfs_flt_kset;
+-      kobject_set_name(&flt->f_kobj, "%s", flt_name);
+-      if ((rv = kobject_register(&flt->f_kobj))) {
++      flt->f_kobj.kset = rfs_flt_kset;
++      if ((rv = kobject_init_and_add(&flt->f_kobj, &rfs_flt_type, 
&rfs_flt_kset->kobj, "%s", flt_name))) {
+               kfree(flt_name);
+               kfree(flt);
+               return ERR_PTR(rv);
+@@ -166,7 +166,7 @@
+
+       wait_event_interruptible(flt->f_wait, atomic_read(&flt->f_del));
+
+-      kobject_unregister(&flt->f_kobj);
++      kobject_put(&flt->f_kobj);
+       kfree(flt->f_name);
+       kfree(flt);
+
+--- path.c
++++ path.c     2008/03/12 13:23:05
+@@ -61,7 +61,7 @@
+       path_buf = kmalloc(path_len + 1, GFP_KERNEL);
+
+       if (!path || !path_buf) {
+-              path_release(&nd);
++              path_put(&nd.path);
+               kfree(path);
+               kfree(path_buf);
+               return ERR_PTR(-ENOMEM);
+@@ -74,8 +74,8 @@
+       path->p_exchain = NULL;
+       path->p_inchain_local = NULL;
+       path->p_exchain_local = NULL;
+-      path->p_dentry = dget(nd.dentry);
+-      path->p_mnt = mntget(nd.mnt);
++      path->p_dentry = dget(nd.path.dentry);
++      path->p_mnt = mntget(nd.path.mnt);
+       path->p_path = path_buf;
+       path->p_len = path_len;
+       path->p_parent = NULL;
+@@ -88,12 +88,12 @@
+       INIT_LIST_HEAD(&path->p_subpath);
+       INIT_LIST_HEAD(&path->p_rem);
+
+-      path_release(&nd);
++      path_put(&nd.path);
+
+       return path;
+ }
+
+-struct rpath *path_get(struct rpath *path)
++struct rpath *rpath_get(struct rpath *path)
+ {
+       unsigned long flags;
+
+@@ -108,7 +108,7 @@
+       return path;
+ }
+
+-void path_put(struct rpath *path)
++void rpath_put(struct rpath *path)
+ {
+       unsigned long flags;
+
+@@ -129,7 +129,7 @@
+       if (!del)
+               return;
+
+-      path_put(path->p_parent);
++      rpath_put(path->p_parent);
+       kfree(path->p_path);
+       kfree(path);
+ }
+@@ -172,7 +172,7 @@
+       }
+
+       if (found)
+-              found = path_get(found);
++              found = rpath_get(found);
+
+       return found;
+ }
+@@ -213,16 +213,16 @@
+
+               if (!strncmp(loop->p_path, path_name, path_len)) {
+                       list_move(&loop->p_sibpath, &path->p_subpath);
+-                      path_put(loop->p_parent);
+-                      loop->p_parent = path_get(path);
++                      rpath_put(loop->p_parent);
++                      loop->p_parent = rpath_get(path);
+               }
+       }
+
+-      path->p_parent = path_get(parent);
++      path->p_parent = rpath_get(parent);
+       list_add(&path->p_sibpath, head);
+
+-      path_get(path);
+-      path_put(parent);
++      rpath_get(path);
++      rpath_put(parent);
+
+       return path;
+ }
+@@ -247,8 +247,8 @@
+       list_for_each_safe(act, tmp, &path->p_subpath) {
+               loop = list_entry(act, struct rpath, p_sibpath);
+               list_move(&loop->p_sibpath, dst);
+-              path_put(loop->p_parent);
+-              loop->p_parent = path_get(path->p_parent);
++              rpath_put(loop->p_parent);
++              loop->p_parent = rpath_get(path->p_parent);
+       }
+
+       list_del(&path->p_sibpath);
+@@ -260,7 +260,7 @@
+
+       dput(dentry);
+
+-      path_put(path);
++      rpath_put(path);
+ }
+
+ int rfs_path_walk(struct rpath *path, int walkcb(struct rpath*, void*), void 
*datacb)
+@@ -335,13 +335,13 @@
+               return -ENOENT;
+
+       if (path_info->flags & RFS_PATH_SUBTREE) {
+-              if (!S_ISDIR(nd.dentry->d_inode->i_mode)) {
+-                      path_release(&nd);
++              if (!S_ISDIR(nd.path.dentry->d_inode->i_mode)) {
++                      path_put(&nd.path);
+                       return -ENOTDIR;
+               }
+       }
+
+-      path_release(&nd);
++      path_put(&nd.path);
+
+       path_len = strlen(path_info->path) + 1;
+       path_name = kmalloc(path_len, GFP_KERNEL);
+@@ -411,11 +411,11 @@
+       if (!path && parent) {
+               if (path_info->flags & RFS_PATH_INCLUDE) {
+                       if (chain_find_flt(parent->p_inchain, flt) != -1)
+-                              path = path_get(parent);
++                              path = rpath_get(parent);
+
+               } else {
+                       if (chain_find_flt(parent->p_exchain, flt) != -1)
+-                              path = path_get(parent);
++                              path = rpath_get(parent);
+               }
+       }
+
+@@ -474,8 +474,8 @@
+ exit:
+       chain_put(inchain);
+       chain_put(exchain);
+-      path_put(path);
+-      path_put(parent);
++      rpath_put(path);
++      rpath_put(parent);
+       kfree(path_name);
+       mutex_unlock(&path_list_mutex);
+
+@@ -594,7 +594,7 @@
+               return -ENODATA;
+
+       spin_lock(&rdentry->rd_lock);
+-      path = path_get(rdentry->rd_path);
++      path = rpath_get(rdentry->rd_path);
+       spin_unlock(&rdentry->rd_lock);
+
+       /* NOTE: 2007-04-22 Frantisek Hrbata
+@@ -605,7 +605,7 @@
+
+       retv = path_dpath(rdentry, path, buffer, size);
+
+-      path_put(path);
++      rpath_put(path);
+       rdentry_put(rdentry);
+
+       return retv;
+--- rdentry.c
++++ rdentry.c  2008/03/12 13:00:56
+@@ -69,7 +69,7 @@
+
+       BUG_ON(!list_empty(&rdentry->rd_rfiles));
+
+-      path_put(rdentry->rd_path);
++      rpath_put(rdentry->rd_path);
+       chain_put(rdentry->rd_chain);
+       rinode_put(rdentry->rd_rinode);
+       ops_put(rdentry->rd_ops);
+--- redir.c
++++ redir.c    2008/03/12 13:00:56
+@@ -146,10 +146,10 @@
+
+       spin_lock(&rdentry->rd_lock);
+
+-      path_put(rdentry->rd_path);
++      rpath_put(rdentry->rd_path);
+       chain_put(rdentry->rd_chain);
+       ops_put(rdentry->rd_ops);
+-      rdentry->rd_path = path_get(path_new);
++      rdentry->rd_path = rpath_get(path_new);
+       rdentry->rd_chain = chain_get(chain);
+       rdentry->rd_ops = ops_get(ops);
+
+@@ -158,9 +158,9 @@
+
+               spin_lock(&rfile->rf_lock);
+
+-              path_put(rfile->rf_path);
++              rpath_put(rfile->rf_path);
+               chain_put(rfile->rf_chain);
+-              rfile->rf_path = path_get(path_new);
++              rfile->rf_path = rpath_get(path_new);
+               rfile->rf_chain = chain_get(chain);
+
+               spin_unlock(&rfile->rf_lock);
+@@ -175,9 +175,9 @@
+
+               spin_lock(&rinode->ri_lock);
+
+-              path_put(rinode->ri_path);
++              rpath_put(rinode->ri_path);
+               chain_put(rinode->ri_chain);
+-              rinode->ri_path = path_get(path_new);
++              rinode->ri_path = rpath_get(path_new);
+               rinode->ri_chain = chain_get(chain);
+
+               spin_unlock(&rinode->ri_lock);
+@@ -212,10 +212,10 @@
+       if (rinode) {
+               spin_lock(&rinode->ri_lock);
+
+-              path_put(rinode->ri_path_set);
++              rpath_put(rinode->ri_path_set);
+               chain_put(rinode->ri_chain_set);
+               ops_put(rinode->ri_ops_set);
+-              rinode->ri_path_set = path_get(path);
++              rinode->ri_path_set = rpath_get(path);
+               rinode->ri_chain_set = chain_get(path->p_inchain);;
+               rinode->ri_ops_set = ops_get(path->p_ops);
+
+@@ -247,10 +247,10 @@
+
+       spin_lock(&rdentry->rd_lock);
+
+-      path_put(rdentry->rd_path);
++      rpath_put(rdentry->rd_path);
+       chain_put(rdentry->rd_chain);
+       ops_put(rdentry->rd_ops);
+-      rdentry->rd_path = path_get(path);
++      rdentry->rd_path = rpath_get(path);
+       rdentry->rd_chain = chain_get(path->p_inchain);
+       rdentry->rd_ops = ops_get(path->p_ops);
+
+@@ -259,9 +259,9 @@
+
+               spin_lock(&rfile->rf_lock);
+
+-              path_put(rfile->rf_path);
++              rpath_put(rfile->rf_path);
+               chain_put(rfile->rf_chain);
+-              rfile->rf_path = path_get(path);
++              rfile->rf_path = rpath_get(path);
+               rfile->rf_chain = chain_get(path->p_inchain);
+
+               spin_unlock(&rfile->rf_lock);
+@@ -278,9 +278,9 @@
+
+       spin_lock(&rinode->ri_lock);
+
+-      path_put(rinode->ri_path);
++      rpath_put(rinode->ri_path);
+       chain_put(rinode->ri_chain);
+-      rinode->ri_path = path_get(path);
++      rinode->ri_path = rpath_get(path);
+       rinode->ri_chain = chain_get(path->p_inchain);;
+
+       spin_unlock(&rinode->ri_lock);
+--- redir.h
++++ redir.h    2008/03/12 13:01:32
+@@ -110,8 +110,8 @@
+
+ int path_del(struct rpath *path);
+ struct rpath *path_alloc(const char *path_name);
+-struct rpath *path_get(struct rpath *path);
+-void path_put(struct rpath *path);
++struct rpath *rpath_get(struct rpath *path);
++void rpath_put(struct rpath *path);
+ void path_add_rdentry(struct rpath *path, struct rdentry *rdentry);
+ void path_del_rdentry(struct rpath *path, struct rdentry *rdentry);
+ int rfs_path_walk(struct rpath *path, int walkcb(struct rpath*, void*), void 
*datacb);
+--- rfile.c
++++ rfile.c    2008/03/12 13:00:56
+@@ -86,7 +86,7 @@
+       if (!atomic_dec_and_test(&rfile->rf_count))
+               return;
+
+-      path_put(rfile->rf_path);
++      rpath_put(rfile->rf_path);
+       chain_put(rfile->rf_chain);
+       rdentry_put(rfile->rf_rdentry);
+
+@@ -156,7 +156,7 @@
+
+               rfile_new->rf_rdentry = rdentry_get(rdentry);
+               rfile_new->rf_chain = chain_get(rdentry->rd_chain);
+-              rfile_new->rf_path = path_get(rdentry->rd_path);
++              rfile_new->rf_path = rpath_get(rdentry->rd_path);
+
+               fops_put(file->f_op);
+               fops_get(&rfile_new->rf_op_new);
+--- rinode.c
++++ rinode.c   2008/03/12 13:00:56
+@@ -75,9 +75,9 @@
+       if (!atomic_dec_and_test(&rinode->ri_count))
+               return;
+
+-      path_put(rinode->ri_path);
++      rpath_put(rinode->ri_path);
+       chain_put(rinode->ri_chain);
+-      path_put(rinode->ri_path_set);
++      rpath_put(rinode->ri_path_set);
+       chain_put(rinode->ri_chain_set);
+       ops_put(rinode->ri_ops_set);
+       BUG_ON(!list_empty(&rinode->ri_rdentries));
+@@ -283,10 +283,10 @@
+       }
+
+       spin_lock(&parent->ri_lock);
+-      path_set = path_get(parent->ri_path_set);
++      path_set = rpath_get(parent->ri_path_set);
+       chain_set = chain_get(parent->ri_chain_set);
+       ops_set = ops_get(parent->ri_ops_set);
+-      path = path_get(parent->ri_path);
++      path = rpath_get(parent->ri_path);
+       chain = chain_get(parent->ri_chain);
+       spin_unlock(&parent->ri_lock);
+
+@@ -325,10 +325,10 @@
+       }
+
+       spin_lock(&rdentry->rd_lock);
+-      path_put(rdentry->rd_path);
++      rpath_put(rdentry->rd_path);
+       chain_put(rdentry->rd_chain);
+       ops_put(rdentry->rd_ops);
+-      rdentry->rd_path = path_get(path_set);
++      rdentry->rd_path = rpath_get(path_set);
+       rdentry->rd_chain = chain_get(chain_set);
+       rdentry->rd_ops = ops_get(ops_set);
+       spin_unlock(&rdentry->rd_lock);
+@@ -337,15 +337,15 @@
+       rinode = rdentry->rd_rinode;
+       if (rinode) {
+               spin_lock(&rinode->ri_lock);
+-              path_put(rinode->ri_path_set);
++              rpath_put(rinode->ri_path_set);
+               chain_put(rinode->ri_chain_set);
+               ops_put(rinode->ri_ops_set);
+-              path_put(rinode->ri_path);
++              rpath_put(rinode->ri_path);
+               chain_put(rinode->ri_chain);
+-              rinode->ri_path_set = path_get(path_set);
++              rinode->ri_path_set = rpath_get(path_set);
+               rinode->ri_chain_set = chain_get(chain_set);
+               rinode->ri_ops_set = ops_get(ops_set);
+-              rinode->ri_path = path_get(path_set);
++              rinode->ri_path = rpath_get(path_set);
+               rinode->ri_chain = chain_get(chain_set);
+               spin_unlock(&rinode->ri_lock);
+               rinode_set_ops(rinode, ops_set);
+@@ -354,10 +354,10 @@
+ exit:
+       rdentry_put(rdentry);
+       rinode_put(parent);
+-      path_put(path_set);
++      rpath_put(path_set);
+       chain_put(chain_set);
+       ops_put(ops_set);
+-      path_put(path);
++      rpath_put(path);
+       chain_put(chain);
+
+       BUG_ON(!list_empty(&cont.data_list));
+@@ -388,10 +388,10 @@
+       }
+
+       spin_lock(&parent->ri_lock);
+-      path_set = path_get(parent->ri_path_set);
++      path_set = rpath_get(parent->ri_path_set);
+       chain_set = chain_get(parent->ri_chain_set);
+       ops_set = ops_get(parent->ri_ops_set);
+-      path = path_get(parent->ri_path);
++      path = rpath_get(parent->ri_path);
+       chain = chain_get(parent->ri_chain);
+       spin_unlock(&parent->ri_lock);
+
+@@ -431,10 +431,10 @@
+       }
+
+       spin_lock(&rdentry->rd_lock);
+-      path_put(rdentry->rd_path);
++      rpath_put(rdentry->rd_path);
+       chain_put(rdentry->rd_chain);
+       ops_put(rdentry->rd_ops);
+-      rdentry->rd_path = path_get(path_set);
++      rdentry->rd_path = rpath_get(path_set);
+       rdentry->rd_chain = chain_get(chain_set);
+       rdentry->rd_ops = ops_get(ops_set);
+       spin_unlock(&rdentry->rd_lock);
+@@ -443,15 +443,15 @@
+       rinode = rdentry->rd_rinode;
+       if (rinode) {
+               spin_lock(&rinode->ri_lock);
+-              path_put(rinode->ri_path_set);
++              rpath_put(rinode->ri_path_set);
+               chain_put(rinode->ri_chain_set);
+               ops_put(rinode->ri_ops_set);
+-              path_put(rinode->ri_path);
++              rpath_put(rinode->ri_path);
+               chain_put(rinode->ri_chain);
+-              rinode->ri_path_set = path_get(path_set);
++              rinode->ri_path_set = rpath_get(path_set);
+               rinode->ri_chain_set = chain_get(chain_set);
+               rinode->ri_ops_set = ops_get(ops_set);
+-              rinode->ri_path = path_get(path_set);
++              rinode->ri_path = rpath_get(path_set);
+               rinode->ri_chain = chain_get(chain_set);
+               spin_unlock(&rinode->ri_lock);
+               rinode_set_ops(rinode, ops_set);
+@@ -460,10 +460,10 @@
+ exit:
+       rdentry_put(rdentry);
+       rinode_put(parent);
+-      path_put(path_set);
++      rpath_put(path_set);
+       chain_put(chain_set);
+       ops_put(ops_set);
+-      path_put(path);
++      rpath_put(path);
+       chain_put(chain);
+
+       BUG_ON(!list_empty(&cont.data_list));
+@@ -495,10 +495,10 @@
+       }
+
+       spin_lock(&parent->ri_lock);
+-      path_set = path_get(parent->ri_path_set);
++      path_set = rpath_get(parent->ri_path_set);
+       chain_set = chain_get(parent->ri_chain_set);
+       ops_set = ops_get(parent->ri_ops_set);
+-      path = path_get(parent->ri_path);
++      path = rpath_get(parent->ri_path);
+       chain = chain_get(parent->ri_chain);
+       spin_unlock(&parent->ri_lock);
+
+@@ -537,10 +537,10 @@
+       }
+
+       spin_lock(&rdentry->rd_lock);
+-      path_put(rdentry->rd_path);
++      rpath_put(rdentry->rd_path);
+       chain_put(rdentry->rd_chain);
+       ops_put(rdentry->rd_ops);
+-      rdentry->rd_path = path_get(path_set);
++      rdentry->rd_path = rpath_get(path_set);
+       rdentry->rd_chain = chain_get(chain_set);
+       rdentry->rd_ops = ops_get(ops_set);
+       spin_unlock(&rdentry->rd_lock);
+@@ -549,15 +549,15 @@
+       rinode = rdentry->rd_rinode;
+       if (rinode) {
+               spin_lock(&rinode->ri_lock);
+-              path_put(rinode->ri_path_set);
++              rpath_put(rinode->ri_path_set);
+               chain_put(rinode->ri_chain_set);
+               ops_put(rinode->ri_ops_set);
+-              path_put(rinode->ri_path);
++              rpath_put(rinode->ri_path);
+               chain_put(rinode->ri_chain);
+-              rinode->ri_path_set = path_get(path_set);
++              rinode->ri_path_set = rpath_get(path_set);
+               rinode->ri_chain_set = chain_get(chain_set);
+               rinode->ri_ops_set = ops_get(ops_set);
+-              rinode->ri_path = path_get(path_set);
++              rinode->ri_path = rpath_get(path_set);
+               rinode->ri_chain = chain_get(chain_set);
+               spin_unlock(&rinode->ri_lock);
+               rinode_set_ops(rinode, ops_set);
+@@ -566,10 +566,10 @@
+ exit:
+       rdentry_put(rdentry);
+       rinode_put(parent);
+-      path_put(path_set);
++      rpath_put(path_set);
+       chain_put(chain_set);
+       ops_put(ops_set);
+-      path_put(path);
++      rpath_put(path);
+       chain_put(chain);
+
+       BUG_ON(!list_empty(&cont.data_list));
+@@ -600,10 +600,10 @@
+       }
+
+       spin_lock(&parent->ri_lock);
+-      path_set = path_get(parent->ri_path_set);
++      path_set = rpath_get(parent->ri_path_set);
+       chain_set = chain_get(parent->ri_chain_set);
+       ops_set = ops_get(parent->ri_ops_set);
+-      path = path_get(parent->ri_path);
++      path = rpath_get(parent->ri_path);
+       chain = chain_get(parent->ri_chain);
+       spin_unlock(&parent->ri_lock);
+
+@@ -642,10 +642,10 @@
+       }
+
+       spin_lock(&rdentry->rd_lock);
+-      path_put(rdentry->rd_path);
++      rpath_put(rdentry->rd_path);
+       chain_put(rdentry->rd_chain);
+       ops_put(rdentry->rd_ops);
+-      rdentry->rd_path = path_get(path_set);
++      rdentry->rd_path = rpath_get(path_set);
+       rdentry->rd_chain = chain_get(chain_set);
+       rdentry->rd_ops = ops_get(ops_set);
+       spin_unlock(&rdentry->rd_lock);
+@@ -654,15 +654,15 @@
+       rinode = rdentry->rd_rinode;
+       if (rinode) {
+               spin_lock(&rinode->ri_lock);
+-              path_put(rinode->ri_path_set);
++              rpath_put(rinode->ri_path_set);
+               chain_put(rinode->ri_chain_set);
+               ops_put(rinode->ri_ops_set);
+-              path_put(rinode->ri_path);
++              rpath_put(rinode->ri_path);
+               chain_put(rinode->ri_chain);
+-              rinode->ri_path_set = path_get(path_set);
++              rinode->ri_path_set = rpath_get(path_set);
+               rinode->ri_chain_set = chain_get(chain_set);
+               rinode->ri_ops_set = ops_get(ops_set);
+-              rinode->ri_path = path_get(path_set);
++              rinode->ri_path = rpath_get(path_set);
+               rinode->ri_chain = chain_get(chain_set);
+               spin_unlock(&rinode->ri_lock);
+               rinode_set_ops(rinode, ops_set);
+@@ -671,10 +671,10 @@
+ exit:
+       rdentry_put(rdentry);
+       rinode_put(parent);
+-      path_put(path_set);
++      rpath_put(path_set);
+       chain_put(chain_set);
+       ops_put(ops_set);
+-      path_put(path);
++      rpath_put(path);
+       chain_put(chain);
+
+       BUG_ON(!list_empty(&cont.data_list));
+@@ -705,10 +705,10 @@
+       }
+
+       spin_lock(&parent->ri_lock);
+-      path_set = path_get(parent->ri_path_set);
++      path_set = rpath_get(parent->ri_path_set);
+       chain_set = chain_get(parent->ri_chain_set);
+       ops_set = ops_get(parent->ri_ops_set);
+-      path = path_get(parent->ri_path);
++      path = rpath_get(parent->ri_path);
+       chain = chain_get(parent->ri_chain);
+       spin_unlock(&parent->ri_lock);
+
+@@ -747,10 +747,10 @@
+       }
+
+       spin_lock(&rdentry->rd_lock);
+-      path_put(rdentry->rd_path);
++      rpath_put(rdentry->rd_path);
+       chain_put(rdentry->rd_chain);
+       ops_put(rdentry->rd_ops);
+-      rdentry->rd_path = path_get(path_set);
++      rdentry->rd_path = rpath_get(path_set);
+       rdentry->rd_chain = chain_get(chain_set);
+       rdentry->rd_ops = ops_get(ops_set);
+       spin_unlock(&rdentry->rd_lock);
+@@ -759,15 +759,15 @@
+       rinode = rdentry->rd_rinode;
+       if (rinode) {
+               spin_lock(&rinode->ri_lock);
+-              path_put(rinode->ri_path_set);
++              rpath_put(rinode->ri_path_set);
+               chain_put(rinode->ri_chain_set);
+               ops_put(rinode->ri_ops_set);
+-              path_put(rinode->ri_path);
++              rpath_put(rinode->ri_path);
+               chain_put(rinode->ri_chain);
+-              rinode->ri_path_set = path_get(path_set);
++              rinode->ri_path_set = rpath_get(path_set);
+               rinode->ri_chain_set = chain_get(chain_set);
+               rinode->ri_ops_set = ops_get(ops_set);
+-              rinode->ri_path = path_get(path_set);
++              rinode->ri_path = rpath_get(path_set);
+               rinode->ri_chain = chain_get(chain_set);
+               spin_unlock(&rinode->ri_lock);
+               rinode_set_ops(rinode, ops_set);
+@@ -776,10 +776,10 @@
+ exit:
+       rdentry_put(rdentry);
+       rinode_put(parent);
+-      path_put(path_set);
++      rpath_put(path_set);
+       chain_put(chain_set);
+       ops_put(ops_set);
+-      path_put(path);
++      rpath_put(path);
+       chain_put(chain);
+
+       BUG_ON(!list_empty(&cont.data_list));
+@@ -810,10 +810,10 @@
+       }
+
+       spin_lock(&parent->ri_lock);
+-      path_set = path_get(parent->ri_path_set);
++      path_set = rpath_get(parent->ri_path_set);
+       chain_set = chain_get(parent->ri_chain_set);
+       ops_set = ops_get(parent->ri_ops_set);
+-      path = path_get(parent->ri_path);
++      path = rpath_get(parent->ri_path);
+       chain = chain_get(parent->ri_chain);
+       spin_unlock(&parent->ri_lock);
+
+@@ -853,10 +853,10 @@
+       }
+
+       spin_lock(&rdentry->rd_lock);
+-      path_put(rdentry->rd_path);
++      rpath_put(rdentry->rd_path);
+       chain_put(rdentry->rd_chain);
+       ops_put(rdentry->rd_ops);
+-      rdentry->rd_path = path_get(path_set);
++      rdentry->rd_path = rpath_get(path_set);
+       rdentry->rd_chain = chain_get(chain_set);
+       rdentry->rd_ops = ops_get(ops_set);
+       spin_unlock(&rdentry->rd_lock);
+@@ -865,15 +865,15 @@
+       rinode = rdentry->rd_rinode;
+       if (rinode) {
+               spin_lock(&rinode->ri_lock);
+-              path_put(rinode->ri_path_set);
++              rpath_put(rinode->ri_path_set);
+               chain_put(rinode->ri_chain_set);
+               ops_put(rinode->ri_ops_set);
+-              path_put(rinode->ri_path);
++              rpath_put(rinode->ri_path);
+               chain_put(rinode->ri_chain);
+-              rinode->ri_path_set = path_get(path_set);
++              rinode->ri_path_set = rpath_get(path_set);
+               rinode->ri_chain_set = chain_get(chain_set);
+               rinode->ri_ops_set = ops_get(ops_set);
+-              rinode->ri_path = path_get(path_set);
++              rinode->ri_path = rpath_get(path_set);
+               rinode->ri_chain = chain_get(chain_set);
+               spin_unlock(&rinode->ri_lock);
+               rinode_set_ops(rinode, ops_set);
+@@ -882,10 +882,10 @@
+ exit:
+       rdentry_put(rdentry);
+       rinode_put(parent);
+-      path_put(path_set);
++      rpath_put(path_set);
+       chain_put(chain_set);
+       ops_put(ops_set);
+-      path_put(path);
++      rpath_put(path);
+       chain_put(chain);
+
+       BUG_ON(!list_empty(&cont.data_list));
+--- sysfs.c
++++ sysfs.c    2008/03/12 15:24:33
+@@ -1,14 +1,10 @@
+ #include "redir.h"
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
+-extern struct subsystem fs_subsys;
+-static struct subsystem rfs_subsys;
+-#else
+-extern struct kset fs_subsys;
+-static struct kset rfs_subsys;
+-#endif
++extern struct kobject *fs_kobj;
++static struct kobject *rfs_kobj;
+
+-struct kset rfs_flt_kset;
++
++struct kset *rfs_flt_kset;
+ static struct kobj_type rfs_flt_type;
+ static struct sysfs_ops rfs_flt_ops;
+
+@@ -129,15 +125,9 @@
+
+ int rfs_sysfs_init(void)
+ {
+-      int rv;
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
+-      memset(&rfs_subsys, 0, sizeof(struct subsystem));
+-#else
+-      memset(&rfs_subsys, 0, sizeof(struct kset));
+-#endif
++      memset(rfs_kobj, 0, sizeof(struct kobject));
+       memset(&rfs_flt_type, 0, sizeof(struct kobj_type));
+-      memset(&rfs_flt_kset, 0, sizeof(struct kset));
++      memset(rfs_flt_kset, 0, sizeof(struct kset));
+       memset(&rfs_flt_ops, 0, sizeof(struct sysfs_ops));
+
+       rfs_flt_ops.show = rfs_flt_show;
+@@ -147,30 +137,15 @@
+       rfs_flt_type.default_attrs = rfs_flt_attrs;
+       rfs_flt_type.sysfs_ops = &rfs_flt_ops;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
+-      rfs_subsys.kset.kobj.parent = &fs_subsys.kset.kobj;
+-      rfs_subsys.kset.ktype = NULL;
+-      kobject_set_name(&rfs_subsys.kset.kobj, "%s", "redirfs");
+-#else
+-      rfs_subsys.kobj.parent = &fs_subsys.kobj;
+-      rfs_subsys.ktype = NULL;
+-      kobject_set_name(&rfs_subsys.kobj, "%s", "redirfs");
+-#endif
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
+-      rfs_flt_kset.subsys = &rfs_subsys;
+-#else
+-      rfs_flt_kset.kobj.parent = &rfs_subsys.kobj;
+-#endif
+-      rfs_flt_kset.ktype = &rfs_flt_type;
+-      kobject_set_name(&rfs_flt_kset.kobj, "%s", "filters");
+-
+-      if ((rv = subsystem_register(&rfs_subsys)))
+-              return rv;
++      rfs_kobj = kobject_create_and_add("redirfs", fs_kobj);
++      if ( rfs_kobj == NULL ) {
++          return -ENOMEM;
++      }
+
+-      if ((rv = kset_register(&rfs_flt_kset))) {
+-              subsystem_unregister(&rfs_subsys);
+-              return rv;
++      rfs_flt_kset = kset_create_and_add("filters", NULL, rfs_kobj);
++      if ( rfs_flt_kset == NULL ) {
++          kobject_put(rfs_kobj);
++          return -ENOMEM;
+       }
+
+       return 0;
+@@ -178,8 +153,8 @@
+
+ void rfs_sysfs_destroy(void)
+ {
+-      kset_unregister(&rfs_flt_kset);
+-      subsystem_unregister(&rfs_subsys);
++      kset_unregister(rfs_flt_kset);
++      kobject_put(rfs_kobj);
+ }
+
+ int rfs_register_attribute(rfs_filter filter, struct rfs_flt_attribute *attr)
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to