Subject: + ufs-sb-mutex-merge-mutex_destroy-fix-v2-fix.patch added to -mm tree To: akpm@xxxxxxxxxxxxxxxxxxxx,dushistov@xxxxxxx,fabf@xxxxxxxxx,fengguang.wu@xxxxxxxxx,jet.chen@xxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Fri, 28 Mar 2014 15:43:29 -0700 The patch titled Subject: ufs-sb-mutex-merge-mutex_destroy-fix-v2-fix has been added to the -mm tree. Its filename is ufs-sb-mutex-merge-mutex_destroy-fix-v2-fix.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/ufs-sb-mutex-merge-mutex_destroy-fix-v2-fix.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/ufs-sb-mutex-merge-mutex_destroy-fix-v2-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Subject: ufs-sb-mutex-merge-mutex_destroy-fix-v2-fix avoid ifdefs, return -EROFS not -EINVAL. Cc: "Chen, Jet" <jet.chen@xxxxxxxxx> Cc: Evgeniy Dushistov <dushistov@xxxxxxx> Cc: Fabian Frederick <fabf@xxxxxxxxx> Cc: Wu Fengguang <fengguang.wu@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ufs/super.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff -puN fs/ufs/super.c~ufs-sb-mutex-merge-mutex_destroy-fix-v2-fix fs/ufs/super.c --- a/fs/ufs/super.c~ufs-sb-mutex-merge-mutex_destroy-fix-v2-fix +++ a/fs/ufs/super.c @@ -785,6 +785,14 @@ static int ufs_fill_super(struct super_b flags = 0; UFSD("ENTER\n"); + +#ifndef CONFIG_UFS_FS_WRITE + if (!(sb->s_flags & MS_RDONLY)) { + printk("ufs was compiled with read-only support, " + "can't be mounted as read-write\n"); + return -EROFS; + } +#endif sbi = kzalloc(sizeof(struct ufs_sb_info), GFP_KERNEL); if (!sbi) @@ -794,13 +802,6 @@ static int ufs_fill_super(struct super_b UFSD("flag %u\n", (int)(sb->s_flags & MS_RDONLY)); -#ifndef CONFIG_UFS_FS_WRITE - if (!(sb->s_flags & MS_RDONLY)) { - printk("ufs was compiled with read-only support, " - "can't be mounted as read-write\n"); - goto failed_noreadwrite; - } -#endif mutex_init(&sbi->mutex); spin_lock_init(&sbi->work_lock); INIT_DELAYED_WORK(&sbi->sync_work, delayed_sync_fs); @@ -1256,10 +1257,6 @@ magic_found: failed: mutex_destroy(&sbi->mutex); - -#ifndef CONFIG_UFS_FS_WRITE -failed_noreadwrite: -#endif if (ubh) ubh_brelse_uspi (uspi); kfree (uspi); _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are arch-alpha-kernel-systblss-remove-debug-check.patch i-need-old-gcc.patch maintainers-akpm-maintenance.patch input-route-kbd-leds-through-the-generic-leds-layer.patch ocfs2-add-dlm_recover_callback_support-in-sysfs-fix.patch ocfs2-flock-drop-cross-node-lock-when-failed-locally.patch ocfs2-do-not-return-dlm_migrate_response_mastery_ref-to-avoid-endlessloop-during-umount.patch mm.patch mm-hugetlb-improve-page-fault-scalability-fix.patch mm-vmstat-fix-up-zone-state-accounting-fix.patch mm-keep-page-cache-radix-tree-nodes-in-check-fix-fix.patch mm-process_vm_accessc-mark-function-as-static-fix.patch mm-hugetlbfs-fix-rmapping-for-anonymous-hugepages-with-page_pgoff-v3-fix.patch pagewalk-update-page-table-walker-core-fix-end-address-calculation-in-walk_page_range-fix.patch pagewalk-remove-argument-hmask-from-hugetlb_entry-fix-fix.patch mm-introduce-do_shared_fault-and-drop-do_fault-fix-fix.patch drop_caches-add-some-documentation-and-info-message.patch mmnuma-reorganize-change_pmd_range-fix.patch drivers-lguest-page_tablesc-rename-do_set_pte.patch mm-add-debugfs-tunable-for-fault_around_order-checkpatch-fixes.patch mm-per-thread-vma-caching.patch mm-per-thread-vma-caching-fix-3.patch mm-per-thread-vma-caching-fix-5.patch mm-per-thread-vma-caching-fix-6-checkpatch-fixes.patch mm-per-thread-vma-caching-fix-6-fix.patch mm-use-macros-from-compilerh-instead-of-__attribute__-fix.patch mm-compactionc-isolate_freepages_block-small-tuneup.patch mm-vmallocc-enhance-vm_map_ram-comment-fix.patch zram-use-zcomp-compressing-backends-fix.patch zram-return-error-valued-pointer-from-zcomp_create-fix.patch zram-return-error-valued-pointer-from-zcomp_create-fix-2.patch zram-propagate-error-to-user-fix.patch zram-support-req_discard-v4-fix.patch do_shared_fault-check-that-mmap_sem-is-held.patch include-linux-syscallsh-add-sys32_quotactl-prototype-fix.patch sys_sysfs-add-config_sysfs_syscall-fix.patch kernel-groupsc-remove-return-value-of-set_groups-fix.patch xattr-guard-against-simultaneous-glibc-header-inclusion-v2.patch lib-syscallc-unexport-task_current_syscall.patch scripts-checkpatchpl-__gfp_nofail-isnt-going-away.patch ncpfs-convert-dprintk-ddprintk-to-ncp_dbg-fix.patch ncpfs-convert-dprintk-ddprintk-to-ncp_dbg-fix-fix.patch befs-logging-clean-up-fix.patch hfsplus-fix-concurrent-acess-of-alloc_blocks-fix.patch hfsplus-fix-concurrent-acess-of-alloc_blocks-fix-fix.patch kmod-run-usermodehelpers-only-on-cpus-allowed-for-kthreadd-v2-fix.patch kmod-run-usermodehelpers-only-on-cpus-allowed-for-kthreadd-v2-checkpatch-fixes.patch include-linux-crash_dumph-add-vmcore_cleanup-prototype-fix.patch kernel-panicc-display-reason-at-end-pr_emerg-fix.patch fault-injection-set-bounds-on-what-proc-self-make-it-fail-accepts-fix.patch initramfs-debug-detected-compression-method-fix.patch linux-next.patch linux-next-rejects.patch drivers-gpio-gpio-zevioc-fix-build.patch slub-use-raw_cpu_inc-for-incrementing-statistics-fix.patch vmstat-use-raw_cpu_ops-to-avoid-false-positives-on-preemption-checks-fix.patch percpu-add-preemption-checks-to-__this_cpu-ops-fix-checkpatch-fixes.patch ufs-sb-mutex-merge-mutex_destroy-fix-v2-fix.patch debugging-keep-track-of-page-owners.patch journal_add_journal_head-debug.patch journal_add_journal_head-debug-fix.patch kernel-forkc-export-kernel_thread-to-modules.patch mutex-subsystem-synchro-test-module.patch slab-leaks3-default-y.patch put_bh-debug.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html