[PATCH] fs: remove unused members of struct stat

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

 



Some members in struct stat are never written, so drop them.

Signed-off-by: Ahmad Fatoum <ahmad@xxxxxx>
---
 fs/fs.c              | 4 ++--
 include/linux/stat.h | 3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/fs/fs.c b/fs/fs.c
index c463466e1be0..4837c4b701bc 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -160,9 +160,9 @@ void stat_print(const char *filename, const struct stat *st)
 
 	fdev = get_fsdevice_by_path(filename);
 
-	printf("\nDevice: %s\tInode: %lu\tLinks: %u\n",
+	printf("\nDevice: %s\tInode: %lu\n",
 	       fdev ? dev_name(&fdev->dev) : "<unknown>",
-	       st->st_ino, st->st_nlink);
+	       st->st_ino);
 	printf("Access: (%04o/%s)\tUid: (%u)\tGid: (%u)\n",
 	       st->st_mode & 07777, modestr, st->st_uid, st->st_gid);
 
diff --git a/include/linux/stat.h b/include/linux/stat.h
index 2bdf3ec9c96c..fc3dd222a673 100644
--- a/include/linux/stat.h
+++ b/include/linux/stat.h
@@ -49,11 +49,8 @@ extern "C" {
 struct stat {
 	unsigned long st_ino;
 	unsigned short st_mode;
-	unsigned short st_nlink;
 	unsigned short st_uid;
 	unsigned short st_gid;
-	unsigned short st_rdev;
-	unsigned short __pad2;
 	loff_t  st_size;
 };
 
-- 
2.38.1





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux