diff options
author | Christoph Hellwig <hch@lst.de> | 2008-05-09 06:35:29 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-03-27 14:43:56 -0400 |
commit | ec1ab0abde0af586a59541ad71841f022dcac3e7 (patch) | |
tree | 8614a3633f5d463674479fd7f28ca4dcb1b0fcf8 /fs/affs | |
parent | 8e0ee43bc2c3e19db56a4adaa9a9b04ce885cd84 (diff) |
affs: fix missing unlocks in affs_remove_link
In two error cases affs_remove_link doesn't call affs_unlock_dir to
release the i_hash_lock semaphore.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/affs')
-rw-r--r-- | fs/affs/amigaffs.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/affs/amigaffs.c b/fs/affs/amigaffs.c index 805573005de6..7d0f0a30f7a3 100644 --- a/fs/affs/amigaffs.c +++ b/fs/affs/amigaffs.c | |||
@@ -179,14 +179,18 @@ affs_remove_link(struct dentry *dentry) | |||
179 | affs_lock_dir(dir); | 179 | affs_lock_dir(dir); |
180 | affs_fix_dcache(dentry, link_ino); | 180 | affs_fix_dcache(dentry, link_ino); |
181 | retval = affs_remove_hash(dir, link_bh); | 181 | retval = affs_remove_hash(dir, link_bh); |
182 | if (retval) | 182 | if (retval) { |
183 | affs_unlock_dir(dir); | ||
183 | goto done; | 184 | goto done; |
185 | } | ||
184 | mark_buffer_dirty_inode(link_bh, inode); | 186 | mark_buffer_dirty_inode(link_bh, inode); |
185 | 187 | ||
186 | memcpy(AFFS_TAIL(sb, bh)->name, AFFS_TAIL(sb, link_bh)->name, 32); | 188 | memcpy(AFFS_TAIL(sb, bh)->name, AFFS_TAIL(sb, link_bh)->name, 32); |
187 | retval = affs_insert_hash(dir, bh); | 189 | retval = affs_insert_hash(dir, bh); |
188 | if (retval) | 190 | if (retval) { |
191 | affs_unlock_dir(dir); | ||
189 | goto done; | 192 | goto done; |
193 | } | ||
190 | mark_buffer_dirty_inode(bh, inode); | 194 | mark_buffer_dirty_inode(bh, inode); |
191 | 195 | ||
192 | affs_unlock_dir(dir); | 196 | affs_unlock_dir(dir); |