]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Orangefs: use inode_set_bytes for directories
authorMike Marshall <hubcap@omnibond.com>
Wed, 5 Aug 2015 17:46:28 +0000 (13:46 -0400)
committerMike Marshall <hubcap@omnibond.com>
Sat, 3 Oct 2015 15:40:05 +0000 (11:40 -0400)
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/pvfs2-utils.c

index 6eecb1861acaf580b183a41d94d161a64b9b741b..11ee073ecd19c2d5b193ca0037b801fd13aa2d84 100644 (file)
@@ -162,12 +162,11 @@ static int copy_attributes_to_inode(struct inode *inode,
                }
                /*FALLTHRU*/
        default:
+               inode->i_size = PAGE_CACHE_SIZE;
+
                pvfs2_lock_inode(inode);
-               inode->i_bytes = (unsigned short)PAGE_CACHE_SIZE;
-               inode->i_blocks = (unsigned long)(PAGE_CACHE_SIZE / 512);
+               inode_set_bytes(inode, inode->i_size);
                pvfs2_unlock_inode(inode);
-
-               inode->i_size = PAGE_CACHE_SIZE;
                break;
        }