diff options
author | Dave Airlie <airlied@redhat.com> | 2011-01-05 01:31:08 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-01-05 01:31:08 +0300 |
commit | 4f125010d2d02c481a0fdf5aee23a9f937bc5de1 (patch) | |
tree | dcdcd2ba1d0bb980b57ced9a1b2b5b17c84c8f57 /fs/nilfs2/ioctl.c | |
parent | 204663c48711ddceee09df46269cd34d49d1f7be (diff) | |
parent | 989d873fc5b6a96695b97738dea8d9f02a60f8ab (diff) | |
download | linux-4f125010d2d02c481a0fdf5aee23a9f937bc5de1.tar.xz |
Merge branch 'master' of /home/airlied/kernel/linux-2.6 into drm-core-next
Diffstat (limited to 'fs/nilfs2/ioctl.c')
-rw-r--r-- | fs/nilfs2/ioctl.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c index e00d9457c256..b185e937a335 100644 --- a/fs/nilfs2/ioctl.c +++ b/fs/nilfs2/ioctl.c @@ -337,6 +337,7 @@ static int nilfs_ioctl_move_blocks(struct super_block *sb, struct nilfs_argv *argv, void *buf) { size_t nmembs = argv->v_nmembs; + struct the_nilfs *nilfs = NILFS_SB(sb)->s_nilfs; struct inode *inode; struct nilfs_vdesc *vdesc; struct buffer_head *bh, *n; @@ -353,6 +354,17 @@ static int nilfs_ioctl_move_blocks(struct super_block *sb, ret = PTR_ERR(inode); goto failed; } + if (list_empty(&NILFS_I(inode)->i_dirty)) { + /* + * Add the inode to GC inode list. Garbage Collection + * is serialized and no two processes manipulate the + * list simultaneously. + */ + igrab(inode); + list_add(&NILFS_I(inode)->i_dirty, + &nilfs->ns_gc_inodes); + } + do { ret = nilfs_ioctl_move_inode_block(inode, vdesc, &buffers); |