Re: 2.6.17-rc4-mm1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 15, 2006 at 10:01:44AM -0700, Andrew Morton wrote:
> I don't immediately see how to fix this one, actually:
> 
> static inline int ecryptfs_statfs(struct super_block *sb, struct kstatfs *buf)
> {
> 	return vfs_statfs(ecryptfs_superblock_to_lower(sb), buf);
> }
> 
> Once we've run ecryptfs_superblock_to_lower() to get the "lower
> superblock", we need to turn that back into a vfsmount for
> vfs_statfs()..

Assuming we have all our other ducks in a row, this should work. I
still need to finish the build and run my tests to say for certain,
but here is a tentative fix.

Signed-off-by: Michael Halcrow <[email protected]>

---

Index: linux-2.6.17-rc4-mm1-ecryptfs/fs/ecryptfs/super.c
===================================================================
--- linux-2.6.17-rc4-mm1-ecryptfs.orig/fs/ecryptfs/super.c      2006-05-15 14:16:15.000000000 -0500
+++ linux-2.6.17-rc4-mm1-ecryptfs/fs/ecryptfs/super.c   2006-05-15 14:27:45.000000000 -0500
@@ -124,9 +124,12 @@
  * Get the filesystem statistics. Currently, we let this pass right through
  * to the lower filesystem and take no action ourselves.
  */
-static inline int ecryptfs_statfs(struct super_block *sb, struct kstatfs *buf)
+static int ecryptfs_statfs(struct vfsmount *vfs_mnt, struct kstatfs *buf)
 {
-       return vfs_statfs(ecryptfs_superblock_to_lower(sb), buf);
+       struct vfsmount *lower_mnt;
+
+       lower_mnt = ecryptfs_superblock_to_private(vfs_mnt->mnt_sb)->lower_mnt;
+       return vfs_statfs(lower_mnt, buf);
 }
 
 /**
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux