[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87obvc3e8w.fsf@tucsk.pomaz.szeredi.hu>
Date: Tue, 13 Dec 2011 12:25:19 +0100
From: Miklos Szeredi <miklos@...redi.hu>
To: Sage Weil <sage@...dream.net>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Trond Myklebust <Trond.Myklebust@...app.com>,
roel <roel.kluin@...il.com>, LKML <linux-kernel@...r.kernel.org>,
Steve French <sfrench@...ba.org>, linux-cifs@...r.kernel.org,
fuse-devel@...ts.sourceforge.net, linux-nfs@...r.kernel.org
Subject: Re: ceph, cifs, nfs, fuse: boolean and / or confusion
Sage Weil <sage@...dream.net> writes:
> On Mon, 12 Dec 2011, Andrew Morton wrote:
>>
>> So please prepare and send the NFS patch, with a Reported-by:roel?
Fuse patch follows. Also pushed to git tree:
git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git for-linus
Thanks Roel.
Miklos
----
>From b48c6af2086ab2ba8a9c9b6ce9ecb34592ce500c Mon Sep 17 00:00:00 2001
From: Roel Kluin <roel.kluin@...il.com>
Date: Tue, 13 Dec 2011 10:37:00 +0100
Subject: [PATCH] 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 06222e49 (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@...e.cz>
CC: stable@...r.kernel.org
CC: Josef Bacik <josef@...hat.com>
CC: Al Viro <viro@...iv.linux.org.uk>
---
fs/fuse/file.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 594f07a..19029e9 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1556,7 +1556,7 @@ static loff_t fuse_file_llseek(struct file *file, loff_t offset, int origin)
struct inode *inode = file->f_path.dentry->d_inode;
mutex_lock(&inode->i_mutex);
- if (origin != SEEK_CUR || origin != SEEK_SET) {
+ if (origin != SEEK_CUR && origin != SEEK_SET) {
retval = fuse_update_attributes(inode, NULL, file, NULL);
if (retval)
goto exit;
--
1.7.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists