aboutsummaryrefslogtreecommitdiff
path: root/fs/ceph
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/inode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 913cafd70cd..49a0935c439 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -861,6 +861,10 @@ static void ceph_set_dentry_offset(struct dentry *dn)
di = ceph_dentry(dn);
spin_lock(&inode->i_lock);
+ if ((ceph_inode(inode)->i_ceph_flags & CEPH_I_COMPLETE) == 0) {
+ spin_unlock(&inode->i_lock);
+ return;
+ }
di->offset = ceph_inode(inode)->i_max_offset++;
spin_unlock(&inode->i_lock);