Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
[linux-2.6-block.git] / fs / overlayfs / copy_up.c
index a2a65120c9d04dbc0d4c5dd0de5baa1c133b8ad5..e5869f91b3ab2ce1857b774d980fda740bf996fb 100644 (file)
@@ -233,7 +233,7 @@ int ovl_set_attr(struct dentry *upperdentry, struct kstat *stat)
        return err;
 }
 
-static struct ovl_fh *ovl_encode_fh(struct dentry *lower, uuid_be *uuid)
+static struct ovl_fh *ovl_encode_fh(struct dentry *lower, uuid_t *uuid)
 {
        struct ovl_fh *fh;
        int fh_type, fh_len, dwords;
@@ -284,7 +284,6 @@ static int ovl_set_origin(struct dentry *dentry, struct dentry *lower,
                          struct dentry *upper)
 {
        struct super_block *sb = lower->d_sb;
-       uuid_be *uuid = (uuid_be *) &sb->s_uuid;
        const struct ovl_fh *fh = NULL;
        int err;
 
@@ -294,8 +293,8 @@ static int ovl_set_origin(struct dentry *dentry, struct dentry *lower,
         * up and a pure upper inode.
         */
        if (sb->s_export_op && sb->s_export_op->fh_to_dentry &&
-           uuid_be_cmp(*uuid, NULL_UUID_BE)) {
-               fh = ovl_encode_fh(lower, uuid);
+           !uuid_is_null(&sb->s_uuid)) {
+               fh = ovl_encode_fh(lower, &sb->s_uuid);
                if (IS_ERR(fh))
                        return PTR_ERR(fh);
        }