mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
afs: Fix signal handling in some file ops
afs_mkdir(), afs_create(), afs_link() and afs_symlink() all need to drop the target dentry if a signal causes the operation to be killed immediately before we try to contact the server. Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
parent
bc1527dcb4
commit
4433b69141
@ -818,6 +818,8 @@ static int afs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
|
||||
ret = afs_end_vnode_operation(&fc);
|
||||
if (ret < 0)
|
||||
goto error_key;
|
||||
} else {
|
||||
goto error_key;
|
||||
}
|
||||
|
||||
key_put(key);
|
||||
@ -1006,6 +1008,8 @@ static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
|
||||
ret = afs_end_vnode_operation(&fc);
|
||||
if (ret < 0)
|
||||
goto error_key;
|
||||
} else {
|
||||
goto error_key;
|
||||
}
|
||||
|
||||
key_put(key);
|
||||
@ -1071,6 +1075,8 @@ static int afs_link(struct dentry *from, struct inode *dir,
|
||||
ret = afs_end_vnode_operation(&fc);
|
||||
if (ret < 0)
|
||||
goto error_key;
|
||||
} else {
|
||||
goto error_key;
|
||||
}
|
||||
|
||||
key_put(key);
|
||||
@ -1130,6 +1136,8 @@ static int afs_symlink(struct inode *dir, struct dentry *dentry,
|
||||
ret = afs_end_vnode_operation(&fc);
|
||||
if (ret < 0)
|
||||
goto error_key;
|
||||
} else {
|
||||
goto error_key;
|
||||
}
|
||||
|
||||
key_put(key);
|
||||
|
Loading…
Reference in New Issue
Block a user