ceph: fix truncation when not holding caps
authorYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 9 Feb 2010 19:08:40 +0000 (11:08 -0800)
committerSage Weil <sage@newdream.net>
Thu, 11 Feb 2010 19:48:51 +0000 (11:48 -0800)
commit3d497d858ae6e5f23a28783030aecc69074e102d
tree43c69325be88a7a1ea3842d5f64a33d613fb710c
parent4af6b2257ee0eb8f4bf3b1dc8acb643c0e8a887f
ceph: fix truncation when not holding caps

A truncation should occur when either we have the
specified caps for the file, or (in cases where we are
not the only ones referencing the file) when it is mapped
or when it is opened. The latter two cases were not
handled.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/inode.c