Skip to content

Commit 0eac110

Browse files
committed
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull misc vfs updates from Al Viro: "Assorted stuff all over the place (the largest group here is Christoph's stat cleanups)" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: remove KSTAT_QUERY_FLAGS fs: remove vfs_stat_set_lookup_flags fs: move vfs_fstatat out of line fs: implement vfs_stat and vfs_lstat in terms of vfs_fstatat fs: remove vfs_statx_fd fs: omfs: use kmemdup() rather than kmalloc+memcpy [PATCH] reduce boilerplate in fsid handling fs: Remove duplicated flag O_NDELAY occurring twice in VALID_OPEN_FLAGS selftests: mount: add nosymfollow tests Add a "nosymfollow" mount option.
2 parents 1b307ac + f2d077f commit 0eac110

47 files changed

Lines changed: 308 additions & 129 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

fs/9p/vfs_super.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,7 @@ static int v9fs_statfs(struct dentry *dentry, struct kstatfs *buf)
260260
buf->f_bavail = rs.bavail;
261261
buf->f_files = rs.files;
262262
buf->f_ffree = rs.ffree;
263-
buf->f_fsid.val[0] = rs.fsid & 0xFFFFFFFFUL;
264-
buf->f_fsid.val[1] = (rs.fsid >> 32) & 0xFFFFFFFFUL;
263+
buf->f_fsid = u64_to_fsid(rs.fsid);
265264
buf->f_namelen = rs.namelen;
266265
}
267266
if (res != -ENOSYS)

fs/adfs/super.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,7 @@ static int adfs_statfs(struct dentry *dentry, struct kstatfs *buf)
210210
buf->f_namelen = sbi->s_namelen;
211211
buf->f_bsize = sb->s_blocksize;
212212
buf->f_ffree = (long)(buf->f_bfree * buf->f_files) / (long)buf->f_blocks;
213-
buf->f_fsid.val[0] = (u32)id;
214-
buf->f_fsid.val[1] = (u32)(id >> 32);
213+
buf->f_fsid = u64_to_fsid(id);
215214

216215
return 0;
217216
}

fs/affs/super.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,8 +620,7 @@ affs_statfs(struct dentry *dentry, struct kstatfs *buf)
620620
buf->f_blocks = AFFS_SB(sb)->s_partition_size - AFFS_SB(sb)->s_reserved;
621621
buf->f_bfree = free;
622622
buf->f_bavail = free;
623-
buf->f_fsid.val[0] = (u32)id;
624-
buf->f_fsid.val[1] = (u32)(id >> 32);
623+
buf->f_fsid = u64_to_fsid(id);
625624
buf->f_namelen = AFFSNAMEMAX;
626625
return 0;
627626
}

fs/befs/linuxvfs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -963,8 +963,7 @@ befs_statfs(struct dentry *dentry, struct kstatfs *buf)
963963
buf->f_bavail = buf->f_bfree;
964964
buf->f_files = 0; /* UNKNOWN */
965965
buf->f_ffree = 0; /* UNKNOWN */
966-
buf->f_fsid.val[0] = (u32)id;
967-
buf->f_fsid.val[1] = (u32)(id >> 32);
966+
buf->f_fsid = u64_to_fsid(id);
968967
buf->f_namelen = BEFS_NAME_LEN;
969968

970969
befs_debug(sb, "<--- %s", __func__);

fs/bfs/inode.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,7 @@ static int bfs_statfs(struct dentry *dentry, struct kstatfs *buf)
229229
buf->f_bfree = buf->f_bavail = info->si_freeb;
230230
buf->f_files = info->si_lasti + 1 - BFS_ROOT_INO;
231231
buf->f_ffree = info->si_freei;
232-
buf->f_fsid.val[0] = (u32)id;
233-
buf->f_fsid.val[1] = (u32)(id >> 32);
232+
buf->f_fsid = u64_to_fsid(id);
234233
buf->f_namelen = BFS_NAMELEN;
235234
return 0;
236235
}

fs/ceph/super.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf)
104104
le64_to_cpu(*((__le64 *)&monc->monmap->fsid + 1));
105105
mutex_unlock(&monc->mutex);
106106

107-
buf->f_fsid.val[0] = fsid & 0xffffffff;
108-
buf->f_fsid.val[1] = fsid >> 32;
107+
buf->f_fsid = u64_to_fsid(fsid);
109108

110109
return 0;
111110
}

fs/cramfs/inode.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -690,8 +690,7 @@ static int cramfs_statfs(struct dentry *dentry, struct kstatfs *buf)
690690
buf->f_bavail = 0;
691691
buf->f_files = CRAMFS_SB(sb)->files;
692692
buf->f_ffree = 0;
693-
buf->f_fsid.val[0] = (u32)id;
694-
buf->f_fsid.val[1] = (u32)(id >> 32);
693+
buf->f_fsid = u64_to_fsid(id);
695694
buf->f_namelen = CRAMFS_MAXPATHLEN;
696695
return 0;
697696
}

fs/efs/super.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,7 @@ static int efs_statfs(struct dentry *dentry, struct kstatfs *buf) {
342342
sbi->inode_blocks *
343343
(EFS_BLOCKSIZE / sizeof(struct efs_dinode));
344344
buf->f_ffree = sbi->inode_free; /* free inodes */
345-
buf->f_fsid.val[0] = (u32)id;
346-
buf->f_fsid.val[1] = (u32)(id >> 32);
345+
buf->f_fsid = u64_to_fsid(id);
347346
buf->f_namelen = EFS_MAXNAMELEN; /* max filename length */
348347

349348
return 0;

fs/erofs/super.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,7 @@ static int erofs_statfs(struct dentry *dentry, struct kstatfs *buf)
561561

562562
buf->f_namelen = EROFS_NAME_LEN;
563563

564-
buf->f_fsid.val[0] = (u32)id;
565-
buf->f_fsid.val[1] = (u32)(id >> 32);
564+
buf->f_fsid = u64_to_fsid(id);
566565
return 0;
567566
}
568567

fs/exfat/super.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ static int exfat_statfs(struct dentry *dentry, struct kstatfs *buf)
8989
buf->f_blocks = sbi->num_clusters - 2; /* clu 0 & 1 */
9090
buf->f_bfree = buf->f_blocks - sbi->used_clusters;
9191
buf->f_bavail = buf->f_bfree;
92-
buf->f_fsid.val[0] = (unsigned int)id;
93-
buf->f_fsid.val[1] = (unsigned int)(id >> 32);
92+
buf->f_fsid = u64_to_fsid(id);
9493
/* Unicode utf16 255 characters */
9594
buf->f_namelen = EXFAT_MAX_FILE_LEN * NLS_MAX_CHARSET_SIZE;
9695
return 0;

0 commit comments

Comments
 (0)