diff --git a/fs/lustre/llite/file.c b/fs/lustre/llite/file.c index 44337a2..25d7986 100644 --- a/fs/lustre/llite/file.c +++ b/fs/lustre/llite/file.c @@ -4433,8 +4433,13 @@ static int ll_layout_fetch(struct inode *inode, struct ldlm_lock *lock) rc = md_getxattr(sbi->ll_md_exp, ll_inode2fid(inode), OBD_MD_FLXATTR, XATTR_NAME_LOV, lmmsize, &req); - if (rc < 0) + if (rc < 0) { + if (rc == -ENODATA) { + rc = 0; + goto out; /* empty layout */ + } return rc; + } lmmsize = rc; rc = 0;