lkml.org 
[lkml]   [2006]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[RFC][PATCH 08/27] increment sb writer count when nlink hits zero
From
Date

When a file is unlinked, there will soon be a write to the
filesystem. Note this, and disallow remounts to r/o during
the time when this write is pending.

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---

lxc-dave/fs/libfs.c | 1 +
1 files changed, 1 insertion(+)

diff -puN fs/libfs.c~C-inc-sb-writer-count-on-dec-nlink-to-zero fs/libfs.c
--- lxc/fs/libfs.c~C-inc-sb-writer-count-on-dec-nlink-to-zero 2006-07-12 11:09:23.000000000 -0700
+++ lxc-dave/fs/libfs.c 2006-07-12 11:09:25.000000000 -0700
@@ -276,6 +276,7 @@ void inode_drop_nlink(struct inode *inod
if (inode->i_nlink)
return;
inode->i_state |= I_WRITING_ON_SB;
+ atomic_inc(&inode->i_sb->s_mnt_writers);
}

int simple_unlink(struct inode *dir, struct dentry *dentry)
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-07-12 20:29    [W:0.630 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site