From: Filipe Brandenburger Date: Fri, 30 Nov 2012 03:40:08 +0000 (+0000) Subject: Btrfs: fix permissions of empty files not affected by umask X-Git-Tag: v3.8-rc1~71^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9185aa587b7425f8f4520da2e66792f5f3c2b815;p=pandora-kernel.git Btrfs: fix permissions of empty files not affected by umask When a new file is created with btrfs_create(), the inode will initially be created with permissions 0666 and later on in btrfs_init_acl() it will be adapted to mask out the umask bits. The problem is that this change won't make it into the btrfs_inode unless there's another change to the inode (e.g. writing content changing the size or touching the file changing the mtime.) This fix adds a call to btrfs_update_inode() to btrfs_create() to make sure that the change will not get lost if the in-memory inode is flushed before other changes are made to the file. Signed-off-by: Filipe Brandenburger Reviewed-by: Liu Bo Signed-off-by: Chris Mason --- Reading git-diff-tree failed