diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 17:35:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 17:35:07 -0400 |
commit | 041d6d0be82bed7e0b87181dba5d10b8ab14afd9 (patch) | |
tree | b7af53fa7ca104d30b9759c1f951439af7df3734 /fs/udf/file.c | |
parent | af8cb8aa38296ecc43aca7fae9e574db7b8ae0c4 (diff) | |
parent | cbc8cc33529b0e0e55ae0ff077b8cb0b71d54c7a (diff) |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6:
udf: Fix possible corruption when close races with write
udf: Perform preallocation only for regular files
udf: Remove wrong assignment in udf_symlink
udf: Remove dead code
Diffstat (limited to 'fs/udf/file.c')
-rw-r--r-- | fs/udf/file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/udf/file.c b/fs/udf/file.c index 7464305382b5..b80cbd78833c 100644 --- a/fs/udf/file.c +++ b/fs/udf/file.c | |||
@@ -193,9 +193,11 @@ int udf_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, | |||
193 | static int udf_release_file(struct inode *inode, struct file *filp) | 193 | static int udf_release_file(struct inode *inode, struct file *filp) |
194 | { | 194 | { |
195 | if (filp->f_mode & FMODE_WRITE) { | 195 | if (filp->f_mode & FMODE_WRITE) { |
196 | mutex_lock(&inode->i_mutex); | ||
196 | lock_kernel(); | 197 | lock_kernel(); |
197 | udf_discard_prealloc(inode); | 198 | udf_discard_prealloc(inode); |
198 | unlock_kernel(); | 199 | unlock_kernel(); |
200 | mutex_unlock(&inode->i_mutex); | ||
199 | } | 201 | } |
200 | return 0; | 202 | return 0; |
201 | } | 203 | } |