diff options
author | Christoph Hellwig <hch@lst.de> | 2008-05-09 12:35:29 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-03-27 14:43:56 -0400 |
commit | ec1ab0abde0af586a59541ad71841f022dcac3e7 (patch) | |
tree | 8614a3633f5d463674479fd7f28ca4dcb1b0fcf8 /fs/affs/amigaffs.c | |
parent | 8e0ee43bc2c3e19db56a4adaa9a9b04ce885cd84 (diff) | |
download | kernel_goldelico_gta04-ec1ab0abde0af586a59541ad71841f022dcac3e7.zip kernel_goldelico_gta04-ec1ab0abde0af586a59541ad71841f022dcac3e7.tar.gz kernel_goldelico_gta04-ec1ab0abde0af586a59541ad71841f022dcac3e7.tar.bz2 |
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/amigaffs.c')
-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 8055730..7d0f0a3 100644 --- a/fs/affs/amigaffs.c +++ b/fs/affs/amigaffs.c @@ -179,14 +179,18 @@ affs_remove_link(struct dentry *dentry) affs_lock_dir(dir); affs_fix_dcache(dentry, link_ino); retval = affs_remove_hash(dir, link_bh); - if (retval) + if (retval) { + affs_unlock_dir(dir); goto done; + } mark_buffer_dirty_inode(link_bh, inode); memcpy(AFFS_TAIL(sb, bh)->name, AFFS_TAIL(sb, link_bh)->name, 32); retval = affs_insert_hash(dir, bh); - if (retval) + if (retval) { + affs_unlock_dir(dir); goto done; + } mark_buffer_dirty_inode(bh, inode); affs_unlock_dir(dir); |