Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 338b2f57 authored by Al Viro's avatar Al Viro
Browse files

ncpfs: don't bother with EBUSY on removal of busy directories



Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 5faf153e
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -1123,17 +1123,6 @@ static int ncp_rename(struct inode *old_dir, struct dentry *old_dentry,
		old_dentry->d_parent->d_name.name, old_dentry->d_name.name,
		new_dentry->d_parent->d_name.name, new_dentry->d_name.name);

	if (new_dentry->d_inode && S_ISDIR(new_dentry->d_inode->i_mode)) {
		/*
		 * fail with EBUSY if there are still references to this
		 * directory.
		 */
		dentry_unhash(new_dentry);
		error = -EBUSY;
		if (!d_unhashed(new_dentry))
			goto out;
	}

	ncp_age_dentry(server, old_dentry);
	ncp_age_dentry(server, new_dentry);

+4 −0
Original line number Diff line number Diff line
@@ -891,6 +891,10 @@ int ncp_notify_change(struct dentry *dentry, struct iattr *attr)
	if (!server)	/* How this could happen? */
		goto out;

	result = -EPERM;
	if (IS_DEADDIR(dentry->d_inode))
		goto out;

	/* ageing the dentry to force validation */
	ncp_age_dentry(server, dentry);