Added fsync on/off support.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
fs: sync: enable fsync by default.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
jbd2: optimize jbd2_journal_force_commit

Current implementation of jbd2_journal_force_commit() is suboptimal because
result in empty and useless commits. But callers just want to force and wait
any unfinished commits. We already have jbd2_journal_force_commit_nested()
which does exactly what we want, except we are guaranteed that we do not hold
journal transaction open.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Revert "jbd2: optimize jbd2_journal_force_commit"

This reverts commit aed36146acb4405e61a4835c0860f5580a261bbc.
Revert "ext4: speed up truncate/unlink by not using bforget() unless needed"

This reverts commit cf2d0901e0f782af0917d25394a61fc972973e0a.
Revert "af_unix: speedup /proc/net/unix"

This reverts commit 747bbb2b215d6303b07569ea0dfa531b833a354c.