lkml.org 
[lkml]   [2006]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.17-rc4-mm1

* Andrew Morton <akpm@osdl.org> wrote:

> - The cachefs patches are back (local-disk-based caching of network
> filesystem files) (David Howells)

the blind hacks below are needed to make CONFIG_CACHEFILES build.

Ingo

Index: linux/fs/cachefiles/cf-namei.c
===================================================================
--- linux.orig/fs/cachefiles/cf-namei.c
+++ linux/fs/cachefiles/cf-namei.c
@@ -124,31 +124,31 @@ try_again:
}

/* do the multiway lock magic */
- trap = lock_rename(cache->graveyard, dir);
+ trap = lock_rename(cache->graveyard, dir, 0);

/* do some checks before getting the grave dentry */
if (rep->d_parent != dir) {
/* the entry was probably culled when we dropped the parent dir
* lock */
- unlock_rename(cache->graveyard, dir);
+ unlock_rename(cache->graveyard, dir, 0);
_leave(" = 0 [culled?]");
return 0;
}

if (!S_ISDIR(cache->graveyard->d_inode->i_mode)) {
- unlock_rename(cache->graveyard, dir);
+ unlock_rename(cache->graveyard, dir, 0);
cachefiles_io_error(cache, "Graveyard no longer a directory");
return -EIO;
}

if (trap == rep) {
- unlock_rename(cache->graveyard, dir);
+ unlock_rename(cache->graveyard, dir, 0);
cachefiles_io_error(cache, "May not make directory loop");
return -EIO;
}

if (d_mountpoint(rep)) {
- unlock_rename(cache->graveyard, dir);
+ unlock_rename(cache->graveyard, dir, 0);
cachefiles_io_error(cache, "Mountpoint in cache");
return -EIO;
}
@@ -160,7 +160,7 @@ try_again:

grave = d_alloc(cache->graveyard, &name);
if (!grave) {
- unlock_rename(cache->graveyard, dir);
+ unlock_rename(cache->graveyard, dir, 0);
_leave(" = -ENOMEM");
return -ENOMEM;
}
@@ -168,7 +168,7 @@ try_again:
alt = cache->graveyard->d_inode->i_op->lookup(
cache->graveyard->d_inode, grave, NULL);
if (IS_ERR(alt)) {
- unlock_rename(cache->graveyard, dir);
+ unlock_rename(cache->graveyard, dir, 0);
dput(grave);

if (PTR_ERR(alt) == -ENOMEM) {
@@ -188,7 +188,7 @@ try_again:
}

if (grave->d_inode) {
- unlock_rename(cache->graveyard, dir);
+ unlock_rename(cache->graveyard, dir, 0);
dput(grave);
grave = NULL;
cond_resched();
@@ -196,7 +196,7 @@ try_again:
}

if (d_mountpoint(grave)) {
- unlock_rename(cache->graveyard, dir);
+ unlock_rename(cache->graveyard, dir, 0);
dput(grave);
cachefiles_io_error(cache, "Mountpoint in graveyard");
return -EIO;
@@ -204,7 +204,7 @@ try_again:

/* target should not be an ancestor of source */
if (trap == grave) {
- unlock_rename(cache->graveyard, dir);
+ unlock_rename(cache->graveyard, dir, 0);
dput(grave);
cachefiles_io_error(cache, "May not make directory loop");
return -EIO;
@@ -231,7 +231,7 @@ try_again:

fsnotify_oldname_free(old_name);

- unlock_rename(cache->graveyard, dir);
+ unlock_rename(cache->graveyard, dir, 0);
dput(grave);
_leave(" = 0");
return 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-05-15 21:31    [W:0.256 / U:4.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site