diff options
author | Sage Weil <sage@newdream.net> | 2010-04-15 17:08:49 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-05-17 18:25:27 -0400 |
commit | e8a7498715181ece36130335536e13733a5c3187 (patch) | |
tree | 3a8afe3901eecfefd833e024cf6f661c6992a12c /fs/ceph | |
parent | f1f2765faedc24f8f2e9fd68521a5ea469801b60 (diff) |
ceph: skip set_dentry_offset work if directory not I_COMPLETE
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/inode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 913cafd70cd0..49a0935c4390 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c | |||
@@ -861,6 +861,10 @@ static void ceph_set_dentry_offset(struct dentry *dn) | |||
861 | di = ceph_dentry(dn); | 861 | di = ceph_dentry(dn); |
862 | 862 | ||
863 | spin_lock(&inode->i_lock); | 863 | spin_lock(&inode->i_lock); |
864 | if ((ceph_inode(inode)->i_ceph_flags & CEPH_I_COMPLETE) == 0) { | ||
865 | spin_unlock(&inode->i_lock); | ||
866 | return; | ||
867 | } | ||
864 | di->offset = ceph_inode(inode)->i_max_offset++; | 868 | di->offset = ceph_inode(inode)->i_max_offset++; |
865 | spin_unlock(&inode->i_lock); | 869 | spin_unlock(&inode->i_lock); |
866 | 870 | ||