summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2014-08-09 09:49:31 +0800
committerJan Kara <jack@suse.cz>2014-08-19 18:29:30 +0200
commit85cd083b498572fb9fa575cce3ed910c8ee84294 (patch)
tree2f4d62cbbefd31388b5af4b576a02f0b71e91142 /fs
parent7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 (diff)
downloadop-kernel-dev-85cd083b498572fb9fa575cce3ed910c8ee84294.zip
op-kernel-dev-85cd083b498572fb9fa575cce3ed910c8ee84294.tar.gz
udf: avoid unneeded up_write when fail to add entry in ->symlink
We have released the ->i_data_sem before invoking udf_add_entry(), so in following error path, we should not release this lock again. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r--fs/udf/namei.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/udf/namei.c b/fs/udf/namei.c
index 9737cba..83a0600 100644
--- a/fs/udf/namei.c
+++ b/fs/udf/namei.c
@@ -1014,7 +1014,7 @@ static int udf_symlink(struct inode *dir, struct dentry *dentry,
fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err);
if (!fi)
- goto out_no_entry;
+ goto out_fail;
cfi.icb.extLength = cpu_to_le32(sb->s_blocksize);
cfi.icb.extLocation = cpu_to_lelb(iinfo->i_location);
if (UDF_SB(inode->i_sb)->s_lvid_bh) {
@@ -1036,6 +1036,7 @@ out:
out_no_entry:
up_write(&iinfo->i_data_sem);
+out_fail:
inode_dec_link_count(inode);
iput(inode);
goto out;
OpenPOWER on IntegriCloud