diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-01-29 06:17:57 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-02-18 04:15:47 +0100 |
commit | c88b1e70aeaa38aa20e67e436f28c4d36c0b9f4b (patch) | |
tree | 76b3c8285ba4638f2d923e07eda0c3f90a380ff1 /fs/configfs/inode.c | |
parent | switch ll_lookup_finish_locks() and ll_revalidate_it_finish() to inode (diff) | |
download | linux-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 'fs/configfs/inode.c')
-rw-r--r-- | fs/configfs/inode.c | 10 |
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 */ |