Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git] / fs / nfs / nfs4proc.c
index 8f509a0..0e7f45f 100644 (file)
@@ -151,15 +151,12 @@ const u32 nfs4_fsinfo_bitmap[3] = { FATTR4_WORD0_MAXFILESIZE
 };
 
 const u32 nfs4_fs_locations_bitmap[2] = {
-       FATTR4_WORD0_TYPE
-       | FATTR4_WORD0_CHANGE
+       FATTR4_WORD0_CHANGE
        | FATTR4_WORD0_SIZE
        | FATTR4_WORD0_FSID
        | FATTR4_WORD0_FILEID
        | FATTR4_WORD0_FS_LOCATIONS,
-       FATTR4_WORD1_MODE
-       | FATTR4_WORD1_NUMLINKS
-       | FATTR4_WORD1_OWNER
+       FATTR4_WORD1_OWNER
        | FATTR4_WORD1_OWNER_GROUP
        | FATTR4_WORD1_RAWDEV
        | FATTR4_WORD1_SPACE_USED
@@ -4805,9 +4802,7 @@ int nfs4_proc_fs_locations(struct inode *dir, const struct qstr *name,
                struct nfs4_fs_locations *fs_locations, struct page *page)
 {
        struct nfs_server *server = NFS_SERVER(dir);
-       u32 bitmask[2] = {
-               [0] = FATTR4_WORD0_FSID | FATTR4_WORD0_FS_LOCATIONS,
-       };
+       u32 bitmask[2];
        struct nfs4_fs_locations_arg args = {
                .dir_fh = NFS_FH(dir),
                .name = name,
@@ -4826,12 +4821,15 @@ int nfs4_proc_fs_locations(struct inode *dir, const struct qstr *name,
 
        dprintk("%s: start\n", __func__);
 
+       bitmask[0] = nfs4_fattr_bitmap[0] | FATTR4_WORD0_FS_LOCATIONS;
+       bitmask[1] = nfs4_fattr_bitmap[1];
+
        /* Ask for the fileid of the absent filesystem if mounted_on_fileid
         * is not supported */
        if (NFS_SERVER(dir)->attr_bitmask[1] & FATTR4_WORD1_MOUNTED_ON_FILEID)
-               bitmask[1] |= FATTR4_WORD1_MOUNTED_ON_FILEID;
+               bitmask[0] &= ~FATTR4_WORD0_FILEID;
        else
-               bitmask[0] |= FATTR4_WORD0_FILEID;
+               bitmask[1] &= ~FATTR4_WORD1_MOUNTED_ON_FILEID;
 
        nfs_fattr_init(&fs_locations->fattr);
        fs_locations->server = server;