diff options
Diffstat (limited to 'fs/ufs')
-rw-r--r-- | fs/ufs/inode.c | 2 | ||||
-rw-r--r-- | fs/ufs/namei.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index e765743cf9f3..b4d791a83207 100644 --- a/fs/ufs/inode.c +++ b/fs/ufs/inode.c @@ -409,7 +409,7 @@ out: } /** - * ufs_getfrag_bloc() - `get_block_t' function, interface between UFS and + * ufs_getfrag_block() - `get_block_t' function, interface between UFS and * readpage, writepage and so on */ diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c index 29309e25417f..953ebdfc5bf7 100644 --- a/fs/ufs/namei.c +++ b/fs/ufs/namei.c @@ -258,6 +258,8 @@ static int ufs_rmdir (struct inode * dir, struct dentry *dentry) struct inode * inode = dentry->d_inode; int err= -ENOTEMPTY; + dentry_unhash(dentry); + lock_ufs(dir->i_sb); if (ufs_empty_dir (inode)) { err = ufs_unlink(dir, dentry); @@ -282,6 +284,9 @@ static int ufs_rename(struct inode *old_dir, struct dentry *old_dentry, struct ufs_dir_entry *old_de; int err = -ENOENT; + if (new_inode && S_ISDIR(new_inode->i_mode)) + dentry_unhash(new_dentry); + old_de = ufs_find_entry(old_dir, &old_dentry->d_name, &old_page); if (!old_de) goto out; |