Loading fs/orangefs/namei.c +15 −9 Original line number Original line Diff line number Diff line Loading @@ -22,6 +22,7 @@ static int orangefs_create(struct inode *dir, { { struct orangefs_inode_s *parent = ORANGEFS_I(dir); struct orangefs_inode_s *parent = ORANGEFS_I(dir); struct orangefs_kernel_op_s *new_op; struct orangefs_kernel_op_s *new_op; struct orangefs_object_kref ref; struct inode *inode; struct inode *inode; struct iattr iattr; struct iattr iattr; int ret; int ret; Loading Loading @@ -56,8 +57,10 @@ static int orangefs_create(struct inode *dir, if (ret < 0) if (ret < 0) goto out; goto out; inode = orangefs_new_inode(dir->i_sb, dir, S_IFREG | mode, 0, ref = new_op->downcall.resp.create.refn; &new_op->downcall.resp.create.refn); op_release(new_op); inode = orangefs_new_inode(dir->i_sb, dir, S_IFREG | mode, 0, &ref); if (IS_ERR(inode)) { if (IS_ERR(inode)) { gossip_err("%s: Failed to allocate inode for file :%pd:\n", gossip_err("%s: Failed to allocate inode for file :%pd:\n", __func__, __func__, Loading Loading @@ -90,7 +93,6 @@ static int orangefs_create(struct inode *dir, mark_inode_dirty_sync(dir); mark_inode_dirty_sync(dir); ret = 0; ret = 0; out: out: op_release(new_op); gossip_debug(GOSSIP_NAME_DEBUG, gossip_debug(GOSSIP_NAME_DEBUG, "%s: %pd: returning %d\n", "%s: %pd: returning %d\n", __func__, __func__, Loading Loading @@ -272,6 +274,7 @@ static int orangefs_symlink(struct inode *dir, { { struct orangefs_inode_s *parent = ORANGEFS_I(dir); struct orangefs_inode_s *parent = ORANGEFS_I(dir); struct orangefs_kernel_op_s *new_op; struct orangefs_kernel_op_s *new_op; struct orangefs_object_kref ref; struct inode *inode; struct inode *inode; struct iattr iattr; struct iattr iattr; int mode = 755; int mode = 755; Loading Loading @@ -314,8 +317,10 @@ static int orangefs_symlink(struct inode *dir, goto out; goto out; } } inode = orangefs_new_inode(dir->i_sb, dir, S_IFLNK | mode, 0, ref = new_op->downcall.resp.sym.refn; &new_op->downcall.resp.sym.refn); op_release(new_op); inode = orangefs_new_inode(dir->i_sb, dir, S_IFLNK | mode, 0, &ref); if (IS_ERR(inode)) { if (IS_ERR(inode)) { gossip_err gossip_err ("*** Failed to allocate orangefs symlink inode\n"); ("*** Failed to allocate orangefs symlink inode\n"); Loading Loading @@ -345,7 +350,6 @@ static int orangefs_symlink(struct inode *dir, mark_inode_dirty_sync(dir); mark_inode_dirty_sync(dir); ret = 0; ret = 0; out: out: op_release(new_op); return ret; return ret; } } Loading @@ -353,6 +357,7 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode { { struct orangefs_inode_s *parent = ORANGEFS_I(dir); struct orangefs_inode_s *parent = ORANGEFS_I(dir); struct orangefs_kernel_op_s *new_op; struct orangefs_kernel_op_s *new_op; struct orangefs_object_kref ref; struct inode *inode; struct inode *inode; struct iattr iattr; struct iattr iattr; int ret; int ret; Loading Loading @@ -383,8 +388,10 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode goto out; goto out; } } inode = orangefs_new_inode(dir->i_sb, dir, S_IFDIR | mode, 0, ref = new_op->downcall.resp.mkdir.refn; &new_op->downcall.resp.mkdir.refn); op_release(new_op); inode = orangefs_new_inode(dir->i_sb, dir, S_IFDIR | mode, 0, &ref); if (IS_ERR(inode)) { if (IS_ERR(inode)) { gossip_err("*** Failed to allocate orangefs dir inode\n"); gossip_err("*** Failed to allocate orangefs dir inode\n"); ret = PTR_ERR(inode); ret = PTR_ERR(inode); Loading Loading @@ -416,7 +423,6 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode orangefs_inode_setattr(dir, &iattr); orangefs_inode_setattr(dir, &iattr); mark_inode_dirty_sync(dir); mark_inode_dirty_sync(dir); out: out: op_release(new_op); return ret; return ret; } } Loading Loading
fs/orangefs/namei.c +15 −9 Original line number Original line Diff line number Diff line Loading @@ -22,6 +22,7 @@ static int orangefs_create(struct inode *dir, { { struct orangefs_inode_s *parent = ORANGEFS_I(dir); struct orangefs_inode_s *parent = ORANGEFS_I(dir); struct orangefs_kernel_op_s *new_op; struct orangefs_kernel_op_s *new_op; struct orangefs_object_kref ref; struct inode *inode; struct inode *inode; struct iattr iattr; struct iattr iattr; int ret; int ret; Loading Loading @@ -56,8 +57,10 @@ static int orangefs_create(struct inode *dir, if (ret < 0) if (ret < 0) goto out; goto out; inode = orangefs_new_inode(dir->i_sb, dir, S_IFREG | mode, 0, ref = new_op->downcall.resp.create.refn; &new_op->downcall.resp.create.refn); op_release(new_op); inode = orangefs_new_inode(dir->i_sb, dir, S_IFREG | mode, 0, &ref); if (IS_ERR(inode)) { if (IS_ERR(inode)) { gossip_err("%s: Failed to allocate inode for file :%pd:\n", gossip_err("%s: Failed to allocate inode for file :%pd:\n", __func__, __func__, Loading Loading @@ -90,7 +93,6 @@ static int orangefs_create(struct inode *dir, mark_inode_dirty_sync(dir); mark_inode_dirty_sync(dir); ret = 0; ret = 0; out: out: op_release(new_op); gossip_debug(GOSSIP_NAME_DEBUG, gossip_debug(GOSSIP_NAME_DEBUG, "%s: %pd: returning %d\n", "%s: %pd: returning %d\n", __func__, __func__, Loading Loading @@ -272,6 +274,7 @@ static int orangefs_symlink(struct inode *dir, { { struct orangefs_inode_s *parent = ORANGEFS_I(dir); struct orangefs_inode_s *parent = ORANGEFS_I(dir); struct orangefs_kernel_op_s *new_op; struct orangefs_kernel_op_s *new_op; struct orangefs_object_kref ref; struct inode *inode; struct inode *inode; struct iattr iattr; struct iattr iattr; int mode = 755; int mode = 755; Loading Loading @@ -314,8 +317,10 @@ static int orangefs_symlink(struct inode *dir, goto out; goto out; } } inode = orangefs_new_inode(dir->i_sb, dir, S_IFLNK | mode, 0, ref = new_op->downcall.resp.sym.refn; &new_op->downcall.resp.sym.refn); op_release(new_op); inode = orangefs_new_inode(dir->i_sb, dir, S_IFLNK | mode, 0, &ref); if (IS_ERR(inode)) { if (IS_ERR(inode)) { gossip_err gossip_err ("*** Failed to allocate orangefs symlink inode\n"); ("*** Failed to allocate orangefs symlink inode\n"); Loading Loading @@ -345,7 +350,6 @@ static int orangefs_symlink(struct inode *dir, mark_inode_dirty_sync(dir); mark_inode_dirty_sync(dir); ret = 0; ret = 0; out: out: op_release(new_op); return ret; return ret; } } Loading @@ -353,6 +357,7 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode { { struct orangefs_inode_s *parent = ORANGEFS_I(dir); struct orangefs_inode_s *parent = ORANGEFS_I(dir); struct orangefs_kernel_op_s *new_op; struct orangefs_kernel_op_s *new_op; struct orangefs_object_kref ref; struct inode *inode; struct inode *inode; struct iattr iattr; struct iattr iattr; int ret; int ret; Loading Loading @@ -383,8 +388,10 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode goto out; goto out; } } inode = orangefs_new_inode(dir->i_sb, dir, S_IFDIR | mode, 0, ref = new_op->downcall.resp.mkdir.refn; &new_op->downcall.resp.mkdir.refn); op_release(new_op); inode = orangefs_new_inode(dir->i_sb, dir, S_IFDIR | mode, 0, &ref); if (IS_ERR(inode)) { if (IS_ERR(inode)) { gossip_err("*** Failed to allocate orangefs dir inode\n"); gossip_err("*** Failed to allocate orangefs dir inode\n"); ret = PTR_ERR(inode); ret = PTR_ERR(inode); Loading Loading @@ -416,7 +423,6 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode orangefs_inode_setattr(dir, &iattr); orangefs_inode_setattr(dir, &iattr); mark_inode_dirty_sync(dir); mark_inode_dirty_sync(dir); out: out: op_release(new_op); return ret; return ret; } } Loading