]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] eCryptfs: set O_LARGEFILE when opening lower file
authorMichael Halcrow <mhalcrow@us.ibm.com>
Thu, 1 Mar 2007 04:12:47 +0000 (20:12 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 1 Mar 2007 22:53:37 +0000 (14:53 -0800)
O_LARGEFILE should be set here when opening the lower file.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Cc: Dmitriy Monakhov <dmonakhov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ecryptfs/file.c
fs/ecryptfs/inode.c

index bd969adf70d72bd8cc5335e3f8a47e06c220be52..7a7d25d541e727cb4515acb771c3e077773c5a20 100644 (file)
@@ -205,6 +205,7 @@ int ecryptfs_open_lower_file(struct file **lower_file,
 {
        int rc = 0;
 
+       flags |= O_LARGEFILE;
        dget(lower_dentry);
        mntget(lower_mnt);
        *lower_file = dentry_open(lower_dentry, lower_mnt, flags);
index 9fa7e0b27a96ee57ae08187e17b6872b79d39fd4..0cfff4fefa9ea0b235f14d627b8c9010bceaf8c3 100644 (file)
@@ -200,9 +200,6 @@ static int ecryptfs_initialize_file(struct dentry *ecryptfs_dentry)
        inode = ecryptfs_dentry->d_inode;
        crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat;
        lower_flags = ((O_CREAT | O_TRUNC) & O_ACCMODE) | O_RDWR;
-#if BITS_PER_LONG != 32
-       lower_flags |= O_LARGEFILE;
-#endif
        lower_mnt = ecryptfs_dentry_to_lower_mnt(ecryptfs_dentry);
        /* Corresponding fput() at end of this function */
        if ((rc = ecryptfs_open_lower_file(&lower_file, lower_dentry, lower_mnt,