patch-2.4.27 linux-2.4.27/fs/stat.c
Next file: linux-2.4.27/fs/udf/file.c
Previous file: linux-2.4.27/fs/reiserfs/journal.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
2004-08-07 16:26:06.019402865 -0700
- Orig file:
linux-2.4.26/fs/stat.c
- Orig date:
2004-02-18 05:36:31.000000000 -0800
diff -urN linux-2.4.26/fs/stat.c linux-2.4.27/fs/stat.c
@@ -52,6 +52,8 @@
tmp.st_ino = inode->i_ino;
tmp.st_mode = inode->i_mode;
tmp.st_nlink = inode->i_nlink;
+ if (tmp.st_nlink != inode->i_nlink)
+ return -EOVERFLOW;
SET_OLDSTAT_UID(tmp, inode->i_uid);
SET_OLDSTAT_GID(tmp, inode->i_gid);
tmp.st_rdev = kdev_t_to_nr(inode->i_rdev);
@@ -78,6 +80,8 @@
tmp.st_ino = inode->i_ino;
tmp.st_mode = inode->i_mode;
tmp.st_nlink = inode->i_nlink;
+ if (tmp.st_nlink != inode->i_nlink)
+ return -EOVERFLOW;
SET_STAT_UID(tmp, inode->i_uid);
SET_STAT_GID(tmp, inode->i_gid);
tmp.st_rdev = kdev_t_to_nr(inode->i_rdev);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)