simplify unshare_fs()

Return the resulting fs_struct pointer directly; use ERR_PTR() for
alloc_fs_struct() failure and NULL for "no new fs_struct needed";
both unshare_fs() and its caller are happier that way.

While we are at it, remove the pointless check for NULL current->fs -
it can happen only late in do_exit() and at that point we are *not*
going to call unshare(2) or any other syscalls.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 file changed