]> git.baikalelectronics.ru Git - kernel.git/commit
fuse: fix llseek bug
authorRoel Kluin <roel.kluin@gmail.com>
Tue, 13 Dec 2011 09:37:00 +0000 (10:37 +0100)
committerMiklos Szeredi <mszeredi@suse.cz>
Tue, 13 Dec 2011 09:37:00 +0000 (10:37 +0100)
commite20174a38174e06768b25dfd1f070a9c5f1883e9
tree674ca20427f0a77a8f3e332302983e97c30a9f2a
parentb768f27dd4aa3c160c5ec5e2a4b72f42000074f3
fuse: fix llseek bug

The test in fuse_file_llseek() "not SEEK_CUR or not SEEK_SET" always evaluates
to true.

This was introduced in 3.1 by commit 855ae7a2 (fs: handle SEEK_HOLE/SEEK_DATA
properly in all fs's that define their own llseek) and changed the behavior of
SEEK_CUR and SEEK_SET to always retrieve the file attributes.  This is a
performance regression.

Fix the test so that it makes sense.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: stable@vger.kernel.org
CC: Josef Bacik <josef@redhat.com>
CC: Al Viro <viro@zeniv.linux.org.uk>
fs/fuse/file.c