thermal: armada: Add support for Armada AP806
[linux-2.6-block.git] / fs / coredump.c
index 52c63d6c9143f6fe9370ffd2101b0976f9345c28..1e2c87acac9b0a40fefa0ca2cfb440a1368a8c9f 100644 (file)
@@ -680,16 +680,11 @@ void do_coredump(const siginfo_t *siginfo)
                 * privs and don't want to unlink another user's coredump.
                 */
                if (!need_suid_safe) {
-                       mm_segment_t old_fs;
-
-                       old_fs = get_fs();
-                       set_fs(KERNEL_DS);
                        /*
                         * If it doesn't exist, that's fine. If there's some
                         * other problem, we'll catch it at the filp_open().
                         */
-                       (void) sys_unlink((const char __user *)cn.corename);
-                       set_fs(old_fs);
+                       do_unlinkat(AT_FDCWD, getname_kernel(cn.corename));
                }
 
                /*