version 1.14, 2011/09/27 01:34:41 |
version 1.15, 2011/10/16 12:41:45 |
Line 1330 nilfs_rename(void *v) |
|
Line 1330 nilfs_rename(void *v) |
|
} |
} |
|
|
/* get info about the node to be moved */ |
/* get info about the node to be moved */ |
|
vn_lock(fvp, LK_SHARED | LK_RETRY); |
error = VOP_GETATTR(fvp, &fvap, FSCRED); |
error = VOP_GETATTR(fvp, &fvap, FSCRED); |
|
VOP_UNLOCK(fvp); |
KASSERT(error == 0); |
KASSERT(error == 0); |
|
|
/* check when to delete the old already existing entry */ |
/* check when to delete the old already existing entry */ |
if (tvp) { |
if (tvp) { |
/* get info about the node to be moved to */ |
/* get info about the node to be moved to */ |
error = VOP_GETATTR(fvp, &tvap, FSCRED); |
error = VOP_GETATTR(tvp, &tvap, FSCRED); |
KASSERT(error == 0); |
KASSERT(error == 0); |
|
|
/* if both dirs, make sure the destination is empty */ |
/* if both dirs, make sure the destination is empty */ |