Loading fs/configfs/inode.c +27 −28 Original line number Diff line number Diff line Loading @@ -188,35 +188,34 @@ int configfs_create(struct dentry * dentry, umode_t mode, int (*init)(struct ino { int error = 0; struct inode *inode = NULL; if (dentry) { if (!dentry->d_inode) { struct configfs_dirent *sd = dentry->d_fsdata; if ((inode = configfs_new_inode(mode, sd, dentry->d_sb))) { if (dentry->d_parent && dentry->d_parent->d_inode) { struct inode *p_inode = dentry->d_parent->d_inode; struct configfs_dirent *sd; struct inode *p_inode; if (!dentry) return -ENOENT; if (dentry->d_inode) return -EEXIST; sd = dentry->d_fsdata; inode = configfs_new_inode(mode, sd, dentry->d_sb); if (!inode) return -ENOMEM; p_inode = dentry->d_parent->d_inode; p_inode->i_mtime = p_inode->i_ctime = CURRENT_TIME; } configfs_set_inode_lock_class(sd, inode); goto Proceed; } else error = -ENOMEM; } else error = -EEXIST; } else error = -ENOENT; goto Done; Proceed: if (init) if (init) { error = init(inode); if (!error) { if (error) { iput(inode); return error; } } d_instantiate(dentry, inode); if (S_ISDIR(mode) || S_ISLNK(mode)) dget(dentry); /* pin link and directory dentries in core */ } else iput(inode); Done: return error; } Loading Loading
fs/configfs/inode.c +27 −28 Original line number Diff line number Diff line Loading @@ -188,35 +188,34 @@ int configfs_create(struct dentry * dentry, umode_t mode, int (*init)(struct ino { int error = 0; struct inode *inode = NULL; if (dentry) { if (!dentry->d_inode) { struct configfs_dirent *sd = dentry->d_fsdata; if ((inode = configfs_new_inode(mode, sd, dentry->d_sb))) { if (dentry->d_parent && dentry->d_parent->d_inode) { struct inode *p_inode = dentry->d_parent->d_inode; struct configfs_dirent *sd; struct inode *p_inode; if (!dentry) return -ENOENT; if (dentry->d_inode) return -EEXIST; sd = dentry->d_fsdata; inode = configfs_new_inode(mode, sd, dentry->d_sb); if (!inode) return -ENOMEM; p_inode = dentry->d_parent->d_inode; p_inode->i_mtime = p_inode->i_ctime = CURRENT_TIME; } configfs_set_inode_lock_class(sd, inode); goto Proceed; } else error = -ENOMEM; } else error = -EEXIST; } else error = -ENOENT; goto Done; Proceed: if (init) if (init) { error = init(inode); if (!error) { if (error) { iput(inode); return error; } } d_instantiate(dentry, inode); if (S_ISDIR(mode) || S_ISLNK(mode)) dget(dentry); /* pin link and directory dentries in core */ } else iput(inode); Done: return error; } Loading