summaryrefslogtreecommitdiff
path: root/fs/afs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2017-11-21 01:41:00 +0300
committerDavid Howells <dhowells@redhat.com>2017-11-24 16:55:35 +0300
commit4433b69141864b8c8ba50d0a3ed38341eec9c469 (patch)
treef69fafb038b71ddc0cdb6ed21d3c3aa6e6823d47 /fs/afs
parentbc1527dcb422ead9e1808def6824b4c0e469cc1c (diff)
downloadlinux-4433b69141864b8c8ba50d0a3ed38341eec9c469.tar.xz
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>
Diffstat (limited to 'fs/afs')
-rw-r--r--fs/afs/dir.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/afs/dir.c b/fs/afs/dir.c
index bb89876fbb8e..c02324969429 100644
--- a/fs/afs/dir.c
+++ b/fs/afs/dir.c
@@ -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);