ANDROID: mnt: Add filesystem private data to mount points
This starts to add private data associated directly
to mount points. The intent is to give filesystems
a sense of where they have come from, as a means of
letting a filesystem take different actions based on
this information.
Change-Id: Ie769d7b3bb2f5972afe05c1bf16cf88c91647ab2
Signed-off-by: Daniel Rosenberg <drosen@google.com>
diff --git a/fs/pnode.c b/fs/pnode.c
index 9989970..69b86b6 100644
--- a/fs/pnode.c
+++ b/fs/pnode.c
@@ -458,3 +458,17 @@
__propagate_umount(mnt);
return 0;
}
+
+int propagate_remount(struct mount *mnt) {
+ struct mount *m;
+ struct super_block *sb = mnt->mnt.mnt_sb;
+ int ret = 0;
+
+ if (sb->s_op->copy_mnt_data) {
+ for (m = first_slave(mnt); m->mnt_slave.next != &mnt->mnt_slave_list; m = next_slave(m)) {
+ sb->s_op->copy_mnt_data(m->mnt.data, mnt->mnt.data);
+ }
+ }
+
+ return ret;
+}