]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/sunrpc/cache.c
Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
[mv-sheeva.git] / net / sunrpc / cache.c
index 58de76c8540c65dac38999ea4c9a5c2af5303f92..7dce81a926c5e000b1444d2909fad940b93d0cf4 100644 (file)
 #include <linux/workqueue.h>
 #include <linux/mutex.h>
 #include <linux/pagemap.h>
-#include <linux/smp_lock.h>
 #include <asm/ioctls.h>
 #include <linux/sunrpc/types.h>
 #include <linux/sunrpc/cache.h>
 #include <linux/sunrpc/stats.h>
 #include <linux/sunrpc/rpc_pipe_fs.h>
-#include <linux/smp_lock.h>
 
 #define         RPCDBG_FACILITY RPCDBG_CACHE
 
@@ -320,7 +318,7 @@ static struct cache_detail *current_detail;
 static int current_index;
 
 static void do_cache_clean(struct work_struct *work);
-static DECLARE_DELAYED_WORK(cache_cleaner, do_cache_clean);
+static struct delayed_work cache_cleaner;
 
 static void sunrpc_init_cache_detail(struct cache_detail *cd)
 {
@@ -1349,15 +1347,10 @@ static unsigned int cache_poll_procfs(struct file *filp, poll_table *wait)
 static long cache_ioctl_procfs(struct file *filp,
                               unsigned int cmd, unsigned long arg)
 {
-       long ret;
        struct inode *inode = filp->f_path.dentry->d_inode;
        struct cache_detail *cd = PDE(inode)->data;
 
-       lock_kernel();
-       ret = cache_ioctl(inode, filp, cmd, arg, cd);
-       unlock_kernel();
-
-       return ret;
+       return cache_ioctl(inode, filp, cmd, arg, cd);
 }
 
 static int cache_open_procfs(struct inode *inode, struct file *filp)
@@ -1442,6 +1435,7 @@ static const struct file_operations cache_flush_operations_procfs = {
        .read           = read_flush_procfs,
        .write          = write_flush_procfs,
        .release        = release_flush_procfs,
+       .llseek         = no_llseek,
 };
 
 static void remove_cache_proc_entries(struct cache_detail *cd)
@@ -1504,6 +1498,11 @@ static int create_cache_proc_entries(struct cache_detail *cd)
 }
 #endif
 
+void __init cache_initialize(void)
+{
+       INIT_DELAYED_WORK_DEFERRABLE(&cache_cleaner, do_cache_clean);
+}
+
 int cache_register(struct cache_detail *cd)
 {
        int ret;
@@ -1551,13 +1550,8 @@ static long cache_ioctl_pipefs(struct file *filp,
 {
        struct inode *inode = filp->f_dentry->d_inode;
        struct cache_detail *cd = RPC_I(inode)->private;
-       long ret;
-
-       lock_kernel();
-       ret = cache_ioctl(inode, filp, cmd, arg, cd);
-       unlock_kernel();
 
-       return ret;
+       return cache_ioctl(inode, filp, cmd, arg, cd);
 }
 
 static int cache_open_pipefs(struct inode *inode, struct file *filp)
@@ -1642,6 +1636,7 @@ const struct file_operations cache_flush_operations_pipefs = {
        .read           = read_flush_pipefs,
        .write          = write_flush_pipefs,
        .release        = release_flush_pipefs,
+       .llseek         = no_llseek,
 };
 
 int sunrpc_cache_register_pipefs(struct dentry *parent,