Re: [PATCHv4 05/17] EXOFS: do not manipulate s_dirt directly

From: Boaz Harrosh
Date: Wed May 26 2010 - 11:12:30 EST


On 05/25/2010 04:49 PM, Artem Bityutskiy wrote:
> From: Artem Bityutskiy <Artem.Bityutskiy@xxxxxxxxx>
>
> ... use new VFS helpers instead.
>
> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@xxxxxxxxx>
> Cc: Boaz Harrosh <bharrosh@xxxxxxxxxxx>

Ack-by: Boaz Harrosh <bharrosh@xxxxxxxxxxx>

> ---
> fs/exofs/file.c | 2 +-
> fs/exofs/inode.c | 2 +-
> fs/exofs/super.c | 6 +++---
> 3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/fs/exofs/file.c b/fs/exofs/file.c
> index 839b9dc..be38834 100644
> --- a/fs/exofs/file.c
> +++ b/fs/exofs/file.c
> @@ -58,7 +58,7 @@ static int exofs_file_fsync(struct file *filp, struct dentry *dentry,
> /* This is a good place to write the sb */
> /* TODO: Sechedule an sb-sync on create */
> sb = inode->i_sb;
> - if (sb->s_dirt)
> + if (is_sb_dirty(sb))
> exofs_sync_fs(sb, 1);
>
> return ret;
> diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
> index d7c6afa..0195dcc 100644
> --- a/fs/exofs/inode.c
> +++ b/fs/exofs/inode.c
> @@ -1122,7 +1122,7 @@ struct inode *exofs_new_inode(struct inode *dir, int mode)
>
> sbi = sb->s_fs_info;
>
> - sb->s_dirt = 1;
> + mark_sb_dirty(sb);
> inode_init_owner(inode, dir, mode);
> inode->i_ino = sbi->s_nextid++;
> inode->i_blkbits = EXOFS_BLKSHIFT;
> diff --git a/fs/exofs/super.c b/fs/exofs/super.c
> index 03149b9..91a32ea 100644
> --- a/fs/exofs/super.c
> +++ b/fs/exofs/super.c
> @@ -237,7 +237,7 @@ int exofs_sync_fs(struct super_block *sb, int wait)
> EXOFS_ERR("%s: exofs_sbi_write failed.\n", __func__);
> goto out;
> }
> - sb->s_dirt = 0;
> + mark_sb_clean(sb);
>
> out:
> EXOFS_DBGMSG("s_nextid=0x%llx ret=%d\n", _LLU(sbi->s_nextid), ret);
> @@ -251,7 +251,7 @@ static void exofs_write_super(struct super_block *sb)
> if (!(sb->s_flags & MS_RDONLY))
> exofs_sync_fs(sb, 1);
> else
> - sb->s_dirt = 0;
> + mark_sb_clean(sb);
> }
>
> static void _exofs_print_device(const char *msg, const char *dev_path,
> @@ -286,7 +286,7 @@ static void exofs_put_super(struct super_block *sb)
> int num_pend;
> struct exofs_sb_info *sbi = sb->s_fs_info;
>
> - if (sb->s_dirt)
> + if (is_sb_dirty(sb))
> exofs_write_super(sb);
>
> /* make sure there are no pending commands */

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/