git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This commit was manufactured by cvs2svn to create tag
[linux-2.6.git]
/
fs
/
ext3
/
file.c
diff --git
a/fs/ext3/file.c
b/fs/ext3/file.c
index
50ba686
..
cb02116
100644
(file)
--- a/
fs/ext3/file.c
+++ b/
fs/ext3/file.c
@@
-33,8
+33,10
@@
*/
static int ext3_release_file (struct inode * inode, struct file * filp)
{
*/
static int ext3_release_file (struct inode * inode, struct file * filp)
{
- if (filp->f_mode & FMODE_WRITE)
- ext3_discard_prealloc (inode);
+ /* if we are the last writer on the inode, drop the block reservation */
+ if ((filp->f_mode & FMODE_WRITE) &&
+ (atomic_read(&inode->i_writecount) == 1))
+ ext3_discard_reservation(inode);
if (is_dx(inode) && filp->private_data)
ext3_htree_free_dir_info(filp->private_data);
if (is_dx(inode) && filp->private_data)
ext3_htree_free_dir_info(filp->private_data);