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 /net/sunrpc/rpc_pipe.c | |
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>
Diffstat (limited to 'net/sunrpc/rpc_pipe.c')
-rw-r--r-- | net/sunrpc/rpc_pipe.c | 7 |
1 files changed, 4 insertions, 3 deletions
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); |