From: Tom Zanussi Date: Sun, 8 Jan 2006 09:02:25 +0000 (-0800) Subject: [PATCH] relayfs: add relayfs_remove_file() X-Git-Tag: v2.6.16-rc1~793 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=7431733791feb0b19453d8047b0723c744667040;p=linux-2.6-omap-h63xx.git [PATCH] relayfs: add relayfs_remove_file() This patch adds and exports relayfs_remove_file(), for API symmetry (with relayfs_create_file()). Signed-off-by: Tom Zanussi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/relayfs/inode.c b/fs/relayfs/inode.c index a5e6d4f2efb..b2f50655736 100644 --- a/fs/relayfs/inode.c +++ b/fs/relayfs/inode.c @@ -224,6 +224,17 @@ int relayfs_remove(struct dentry *dentry) return error; } +/** + * relayfs_remove_file - remove a file from relay filesystem + * @dentry: directory dentry + * + * Returns 0 if successful, negative otherwise. + */ +int relayfs_remove_file(struct dentry *dentry) +{ + return relayfs_remove(dentry); +} + /** * relayfs_remove_dir - remove a directory in the relay filesystem * @dentry: directory dentry @@ -600,6 +611,7 @@ EXPORT_SYMBOL_GPL(relayfs_file_operations); EXPORT_SYMBOL_GPL(relayfs_create_dir); EXPORT_SYMBOL_GPL(relayfs_remove_dir); EXPORT_SYMBOL_GPL(relayfs_create_file); +EXPORT_SYMBOL_GPL(relayfs_remove_file); MODULE_AUTHOR("Tom Zanussi and Karim Yaghmour "); MODULE_DESCRIPTION("Relay Filesystem"); diff --git a/include/linux/relayfs_fs.h b/include/linux/relayfs_fs.h index a122df2d988..921540b1cdf 100644 --- a/include/linux/relayfs_fs.h +++ b/include/linux/relayfs_fs.h @@ -153,6 +153,7 @@ extern struct dentry *relayfs_create_file(const char *name, int mode, struct file_operations *fops, void *data); +extern int relayfs_remove_file(struct dentry *dentry); /** * relay_write - write data into the channel