Skip to content

Commit 237f828

Browse files
Martin Brandenburghubcapsc
authored andcommitted
orangefs: Do not retrieve size from servers unless it it necessary.
Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
1 parent 933287d commit 237f828

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎fs/orangefs/inode.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,8 @@ struct inode *orangefs_iget(struct super_block *sb, struct orangefs_object_kref
411411
if (!inode || !(inode->i_state & I_NEW))
412412
return inode;
413413

414-
error = orangefs_inode_getattr(inode, ORANGEFS_ATTR_SYS_ALL_NOHINT, 0);
414+
error = orangefs_inode_getattr(inode,
415+
ORANGEFS_ATTR_SYS_ALL_NOHINT_NOSIZE, 0);
415416
if (error) {
416417
iget_failed(inode);
417418
return ERR_PTR(error);
@@ -456,7 +457,8 @@ struct inode *orangefs_new_inode(struct super_block *sb, struct inode *dir,
456457
orangefs_set_inode(inode, ref);
457458
inode->i_ino = hash; /* needed for stat etc */
458459

459-
error = orangefs_inode_getattr(inode, ORANGEFS_ATTR_SYS_ALL_NOHINT, 0);
460+
error = orangefs_inode_getattr(inode,
461+
ORANGEFS_ATTR_SYS_ALL_NOHINT_NOSIZE, 0);
460462
if (error)
461463
goto out_iput;
462464

0 commit comments

Comments
 (0)