summaryrefslogtreecommitdiffstats
path: root/fs/ceph/inode.c
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@hq.newdream.net>2010-01-29 11:01:11 -0800
committerSage Weil <sage@newdream.net>2010-01-29 12:42:39 -0800
commit0f26c4b21b684825a6dd41f2bc04d48ff62d72f8 (patch)
tree6788224697ce1998c952bce1ff0136831af38648 /fs/ceph/inode.c
parentac8839d7b264d0fa478fca7c4f9b6bb833540a80 (diff)
downloadblackbird-op-linux-0f26c4b21b684825a6dd41f2bc04d48ff62d72f8.tar.gz
blackbird-op-linux-0f26c4b21b684825a6dd41f2bc04d48ff62d72f8.zip
ceph: remove unreachable code
We never truncate to a smaller size without contacting the MDS. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r--fs/ceph/inode.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 71e107fb4dbc..a4f573ab232e 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -1396,7 +1396,6 @@ int ceph_setattr(struct dentry *dentry, struct iattr *attr)
int release = 0, dirtied = 0;
int mask = 0;
int err = 0;
- int queue_trunc = 0;
if (ceph_snap(inode) != CEPH_NOSNAP)
return -EROFS;
@@ -1510,11 +1509,6 @@ int ceph_setattr(struct dentry *dentry, struct iattr *attr)
if ((issued & CEPH_CAP_FILE_EXCL) &&
attr->ia_size > inode->i_size) {
inode->i_size = attr->ia_size;
- if (attr->ia_size < inode->i_size) {
- ci->i_truncate_size = attr->ia_size;
- ci->i_truncate_pending++;
- queue_trunc = 1;
- }
inode->i_blocks =
(attr->ia_size + (1 << 9) - 1) >> 9;
inode->i_ctime = attr->ia_ctime;
@@ -1567,9 +1561,6 @@ int ceph_setattr(struct dentry *dentry, struct iattr *attr)
release &= issued;
spin_unlock(&inode->i_lock);
- if (queue_trunc)
- __ceph_do_pending_vmtruncate(inode);
-
if (mask) {
req->r_inode = igrab(inode);
req->r_inode_drop = release;
OpenPOWER on IntegriCloud