summaryrefslogtreecommitdiffstats
path: root/fs/configfs/inode.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-01-29 06:17:57 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2015-02-18 04:15:47 +0100
commitc88b1e70aeaa38aa20e67e436f28c4d36c0b9f4b (patch)
tree76b3c8285ba4638f2d923e07eda0c3f90a380ff1 /fs/configfs/inode.c
parentswitch ll_lookup_finish_locks() and ll_revalidate_it_finish() to inode (diff)
downloadlinux-c88b1e70aeaa38aa20e67e436f28c4d36c0b9f4b.tar.xz
linux-c88b1e70aeaa38aa20e67e436f28c4d36c0b9f4b.zip
configfs: configfs_create() init callback is never NULL and it never fails
... so make it return void and drop the check for it being non-NULL Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to '')
-rw-r--r--fs/configfs/inode.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c
index 65af86147154..60727db7b0a3 100644
--- a/fs/configfs/inode.c
+++ b/fs/configfs/inode.c
@@ -176,7 +176,7 @@ static void configfs_set_inode_lock_class(struct configfs_dirent *sd,
#endif /* CONFIG_LOCKDEP */
-int configfs_create(struct dentry * dentry, umode_t mode, int (*init)(struct inode *))
+int configfs_create(struct dentry * dentry, umode_t mode, void (*init)(struct inode *))
{
int error = 0;
struct inode *inode = NULL;
@@ -198,13 +198,7 @@ int configfs_create(struct dentry * dentry, umode_t mode, int (*init)(struct ino
p_inode->i_mtime = p_inode->i_ctime = CURRENT_TIME;
configfs_set_inode_lock_class(sd, inode);
- if (init) {
- error = init(inode);
- if (error) {
- iput(inode);
- return error;
- }
- }
+ init(inode);
d_instantiate(dentry, inode);
if (S_ISDIR(mode) || S_ISLNK(mode))
dget(dentry); /* pin link and directory dentries in core */