newctxt->pwdmnt = dev->od_mnt;
newctxt->pwd = dev->od_mnt->mnt_root;
newctxt->fs = get_ds();
+ newctxt->umask = current_umask();
+ newctxt->dt = NULL;
push_ctxt(save, newctxt);
}
if (IS_ERR(d))
GOTO(cleanup, rc = PTR_ERR(d));
- ldiskfs_set_inode_state(d->d_inode, LDISKFS_STATE_LUSTRE_NO_OI);
omm->omm_remote_parent = d;
/* Set LMA for remote parent inode */
dev->od_ost_map->om_subdir_count = rc;
rc = 0;
- CFS_INIT_LIST_HEAD(&dev->od_ost_map->om_seq_list);
+ INIT_LIST_HEAD(&dev->od_ost_map->om_seq_list);
rwlock_init(&dev->od_ost_map->om_seq_list_lock);
- sema_init(&dev->od_ost_map->om_dir_init_sem, 1);
+ mutex_init(&dev->od_ost_map->om_dir_init_mutex);
osd_push_ctxt(dev, &new, &save);
}
inode = d->d_inode;
- ldiskfs_set_inode_state(inode, LDISKFS_STATE_LUSTRE_NO_OI);
dev->od_ost_map->om_root = d;
/* 'What the @fid is' is not imporatant, because the object
{
int j;
- cfs_list_del_init(&osd_seq->oos_seq_list);
+ list_del_init(&osd_seq->oos_seq_list);
if (osd_seq->oos_dirs) {
for (j = 0; j < osd_seq->oos_subdir_count; j++) {
return;
write_lock(&map->om_seq_list_lock);
- cfs_list_for_each_entry_safe(osd_seq, tmp,
- &map->om_seq_list,
- oos_seq_list) {
+ list_for_each_entry_safe(osd_seq, tmp, &map->om_seq_list,
+ oos_seq_list) {
osd_seq_free(map, osd_seq);
}
write_unlock(&map->om_seq_list_lock);
{
struct osd_obj_seq *osd_seq;
- cfs_list_for_each_entry(osd_seq, &map->om_seq_list, oos_seq_list) {
+ list_for_each_entry(osd_seq, &map->om_seq_list, oos_seq_list) {
if (osd_seq->oos_seq == seq)
return osd_seq;
}
GOTO(out_put, rc = -EFAULT);
inode = seq_dir->d_inode;
- ldiskfs_set_inode_state(inode, LDISKFS_STATE_LUSTRE_NO_OI);
osd_seq->oos_root = seq_dir;
/* 'What the @fid is' is not imporatant, because the object
}
inode = dir->d_inode;
- ldiskfs_set_inode_state(inode, LDISKFS_STATE_LUSTRE_NO_OI);
osd_seq->oos_dirs[i] = dir;
/* 'What the @fid is' is not imporatant, because the object
RETURN(osd_seq);
/* Serializing init process */
- down(&map->om_dir_init_sem);
+ mutex_lock(&map->om_dir_init_mutex);
/* Check whether the seq has been added */
read_lock(&map->om_seq_list_lock);
if (osd_seq == NULL)
GOTO(cleanup, rc = -ENOMEM);
- CFS_INIT_LIST_HEAD(&osd_seq->oos_seq_list);
+ INIT_LIST_HEAD(&osd_seq->oos_seq_list);
osd_seq->oos_seq = seq;
/* Init subdir count to be 32, but each seq can have
* different subdir count */
GOTO(cleanup, rc);
write_lock(&map->om_seq_list_lock);
- cfs_list_add(&osd_seq->oos_seq_list, &map->om_seq_list);
+ list_add(&osd_seq->oos_seq_list, &map->om_seq_list);
write_unlock(&map->om_seq_list_lock);
cleanup:
- up(&map->om_dir_init_sem);
+ mutex_unlock(&map->om_dir_init_mutex);
if (rc != 0) {
if (osd_seq != NULL)
OBD_FREE_PTR(osd_seq);
/* If the src object has never been modified, then remove it. */
if (inode->i_size == 0 && inode->i_mode & S_ISUID &&
inode->i_mode & S_ISGID) {
- rc = vfs_unlink(src_parent, src_child);
+ rc = ll_vfs_unlink(src_parent, src_child);
if (unlikely(rc == -ENOENT))
rc = 0;
}
handle_t *th)
{
struct dentry *root;
- char *name;
+ char *name = NULL;
int rc;
ENTRY;
handle_t *th)
{
struct dentry *root;
- char *name;
+ char *name = NULL;
int rc;
ENTRY;
struct dentry *root;
struct dentry *dentry;
struct inode *inode;
- char *name;
+ char *name = NULL;
int rc = -ENOENT;
ENTRY;