]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: fix SEEK_CUR, SEEK_SET regression
authorSage Weil <sage@newdream.net>
Tue, 13 Dec 2011 17:19:26 +0000 (09:19 -0800)
committerSage Weil <sage@newdream.net>
Tue, 13 Dec 2011 17:19:26 +0000 (09:19 -0800)
commit8a3e78cacd6bb2e629442384ccd86018f632bb9e
tree60dea7b341119350274ba9c50cacddc2b357fd52
parent38c312d1a1bafd471bd5abd0f2860b47255dbc5d
ceph: fix SEEK_CUR, SEEK_SET regression

Commit 855ae7a217b43a8edf7687e34bc9de2dcc108972 got the if wrong so that
it always evaluates as true.  This is semantically harmless, but makes
SEEK_CUR and SEEK_SET needlessly query the server.

Rewrite the if to explicitly enumerate the cases we DO need a valid i_size
to make this code less fragile.

Reported-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/file.c