diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-06-07 22:44:34 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 17:15:26 -0400 |
commit | 50e437d522a6cc34a882b2f740297f1b6b4c3af3 (patch) | |
tree | 6026dbb5014495aa9f847a342b8f96c87aabd4ef | |
parent | 7b159fc18d417980f57aef64cab3417ee6af70f8 (diff) |
SUNRPC: Convert rpc_pipefs to use the generic filesystem notification hooks
This will allow rpc.gssd to use inotify instead of dnotify in order to
locate new rpc upcall pipes.
This also requires the exporting of __audit_inode_child(), which is used by
fsnotify_create() and fsnotify_mkdir(). Ccing David Woodhouse.
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r-- | kernel/auditsc.c | 1 | ||||
-rw-r--r-- | net/sunrpc/rpc_pipe.c | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 04f3ffb8d9d4..0ae703c157ba 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -1525,6 +1525,7 @@ add_names: | |||
1525 | context->names[idx].ino = (unsigned long)-1; | 1525 | context->names[idx].ino = (unsigned long)-1; |
1526 | } | 1526 | } |
1527 | } | 1527 | } |
1528 | EXPORT_SYMBOL_GPL(__audit_inode_child); | ||
1528 | 1529 | ||
1529 | /** | 1530 | /** |
1530 | * auditsc_get_stamp - get local copies of audit_context values | 1531 | * auditsc_get_stamp - get local copies of audit_context values |
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 669e12a4ed18..ae83ac84f63b 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/pagemap.h> | 14 | #include <linux/pagemap.h> |
15 | #include <linux/mount.h> | 15 | #include <linux/mount.h> |
16 | #include <linux/namei.h> | 16 | #include <linux/namei.h> |
17 | #include <linux/dnotify.h> | 17 | #include <linux/fsnotify.h> |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | 19 | ||
20 | #include <asm/ioctls.h> | 20 | #include <asm/ioctls.h> |
@@ -585,6 +585,7 @@ rpc_populate(struct dentry *parent, | |||
585 | if (S_ISDIR(mode)) | 585 | if (S_ISDIR(mode)) |
586 | inc_nlink(dir); | 586 | inc_nlink(dir); |
587 | d_add(dentry, inode); | 587 | d_add(dentry, inode); |
588 | fsnotify_create(dir, dentry); | ||
588 | } | 589 | } |
589 | mutex_unlock(&dir->i_mutex); | 590 | mutex_unlock(&dir->i_mutex); |
590 | return 0; | 591 | return 0; |
@@ -606,7 +607,7 @@ __rpc_mkdir(struct inode *dir, struct dentry *dentry) | |||
606 | inode->i_ino = iunique(dir->i_sb, 100); | 607 | inode->i_ino = iunique(dir->i_sb, 100); |
607 | d_instantiate(dentry, inode); | 608 | d_instantiate(dentry, inode); |
608 | inc_nlink(dir); | 609 | inc_nlink(dir); |
609 | inode_dir_notify(dir, DN_CREATE); | 610 | fsnotify_mkdir(dir, dentry); |
610 | return 0; | 611 | return 0; |
611 | out_err: | 612 | out_err: |
612 | printk(KERN_WARNING "%s: %s failed to allocate inode for dentry %s\n", | 613 | printk(KERN_WARNING "%s: %s failed to allocate inode for dentry %s\n", |
@@ -748,7 +749,7 @@ rpc_mkpipe(struct dentry *parent, const char *name, void *private, struct rpc_pi | |||
748 | rpci->flags = flags; | 749 | rpci->flags = flags; |
749 | rpci->ops = ops; | 750 | rpci->ops = ops; |
750 | rpci->nkern_readwriters = 1; | 751 | rpci->nkern_readwriters = 1; |
751 | inode_dir_notify(dir, DN_CREATE); | 752 | fsnotify_create(dir, dentry); |
752 | dget(dentry); | 753 | dget(dentry); |
753 | out: | 754 | out: |
754 | mutex_unlock(&dir->i_mutex); | 755 | mutex_unlock(&dir->i_mutex); |