|
@@ -723,7 +723,9 @@ static noinline int btrfs_mksubvol(struct path *parent,
|
|
|
struct dentry *dentry;
|
|
|
int error;
|
|
|
|
|
|
- mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT);
|
|
|
+ error = mutex_lock_killable_nested(&dir->i_mutex, I_MUTEX_PARENT);
|
|
|
+ if (error == -EINTR)
|
|
|
+ return error;
|
|
|
|
|
|
dentry = lookup_one_len(name, parent->dentry, namelen);
|
|
|
error = PTR_ERR(dentry);
|
|
@@ -2086,7 +2088,9 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file,
|
|
|
if (err)
|
|
|
goto out;
|
|
|
|
|
|
- mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT);
|
|
|
+ err = mutex_lock_killable_nested(&dir->i_mutex, I_MUTEX_PARENT);
|
|
|
+ if (err == -EINTR)
|
|
|
+ goto out;
|
|
|
dentry = lookup_one_len(vol_args->name, parent, namelen);
|
|
|
if (IS_ERR(dentry)) {
|
|
|
err = PTR_ERR(dentry);
|