projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84adede
)
hfsplus: protect readdir against removals from open_dir_list
author
Christoph Hellwig
<hch@tuxera.com>
Fri, 1 Oct 2010 03:45:25 +0000
(
05:45
+0200)
committer
Christoph Hellwig
<hch@lst.de>
Fri, 1 Oct 2010 03:45:25 +0000
(
05:45
+0200)
We already have i_mutex for readdir and the namespace operations that add
entries to open_dir_list, the only thing that was missing was the removal
in hfsplus_dir_release.
Signed-off-by: Christoph Hellwig <hch@tuxera.com>
fs/hfsplus/dir.c
patch
|
blob
|
history
diff --git
a/fs/hfsplus/dir.c
b/fs/hfsplus/dir.c
index 1c81eedcab0121f012910f880604cf9160dc1c01..93fa45cc48103d6f01c45fe61da7f3df7461ffe7 100644
(file)
--- a/
fs/hfsplus/dir.c
+++ b/
fs/hfsplus/dir.c
@@
-231,7
+231,9
@@
static int hfsplus_dir_release(struct inode *inode, struct file *file)
{
struct hfsplus_readdir_data *rd = file->private_data;
if (rd) {
+ mutex_lock(&inode->i_mutex);
list_del(&rd->list);
+ mutex_unlock(&inode->i_mutex);
kfree(rd);
}
return 0;