]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ecryptfs: Make inode bdi consistent with superblock bdi
authorThieu Le <thieule@chromium.org>
Tue, 26 Jul 2011 23:15:10 +0000 (16:15 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 5 Aug 2011 04:58:39 +0000 (21:58 -0700)
commit 985ca0e626e195ea08a1a82b8dbeb6719747429a upstream.

Make the inode mapping bdi consistent with the superblock bdi so that
dirty pages are flushed properly.

Signed-off-by: Thieu Le <thieule@chromium.org>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ecryptfs/inode.c

index 7349ade17de671cabadaeb9e90ec1bdaca28e55b..4a4fad7fb851233e2e69298f8187cce712e00038 100644 (file)
@@ -69,6 +69,7 @@ static int ecryptfs_inode_set(struct inode *inode, void *opaque)
        inode->i_ino = lower_inode->i_ino;
        inode->i_version++;
        inode->i_mapping->a_ops = &ecryptfs_aops;
+       inode->i_mapping->backing_dev_info = inode->i_sb->s_bdi;
 
        if (S_ISLNK(inode->i_mode))
                inode->i_op = &ecryptfs_symlink_iops;