Unionfs: coding style: avoid multiple assignments on same line
authorErez Zadok <ezk@cs.sunysb.edu>
Sat, 29 Sep 2007 05:36:57 +0000 (01:36 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 13 Jan 2009 02:31:18 +0000 (21:31 -0500)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/mmap.c
fs/unionfs/super.c

index ac1a0605c06724888f8c7b3a400ce460dc7243e9..644028279fae73289ccb32210024763dc14a1115 100644 (file)
@@ -179,7 +179,8 @@ static int unionfs_do_readpage(struct file *file, struct page *page)
         * may be a little slower, but a lot safer, as the VFS does a lot of
         * the necessary magic for us.
         */
-       offset = lower_file->f_pos = page_offset(page);
+       lower_file->f_pos = page_offset(page);
+       offset = page_offset(page);
        old_fs = get_fs();
        set_fs(KERNEL_DS);
        err = vfs_read(lower_file, page_data, PAGE_CACHE_SIZE,
index 0da9181a07e5d504d36c91f919e464880e76139b..0a0b075ca108451960396046f5d5d8d7584298f7 100644 (file)
@@ -477,13 +477,16 @@ static int unionfs_remount_fs(struct super_block *sb, int *flags,
         * "add" and "del" commands.  Copy the "options" string because
         * strsep modifies the string and we need it later.
         */
-       optionstmp = tmp_to_free = kstrdup(options, GFP_KERNEL);
+       tmp_to_free = kstrdup(options, GFP_KERNEL);
+       optionstmp = tmp_to_free;
        if (unlikely(!optionstmp)) {
                err = -ENOMEM;
                goto out_free;
        }
-       new_branches = cur_branches = sbmax(sb); /* current no. branches */
-       add_branches = del_branches = 0;
+       cur_branches = sbmax(sb); /* current no. branches */
+       new_branches = sbmax(sb);
+       del_branches = 0;
+       add_branches = 0;
        new_high_branch_id = sbhbid(sb); /* save current high_branch_id */
        while ((optname = strsep(&optionstmp, ",")) != NULL) {
                char *optarg;