SHA256
1
0
forked from pool/quota
quota/quota-3.17-nfs-mntpoint.patch

32 lines
1.1 KiB
Diff
Raw Normal View History

Index: quotasys.c
===================================================================
RCS file: /cvsroot/linuxquota/quota-tools/quotasys.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- quotasys.c 17 Dec 2008 12:40:07 -0000 1.59
+++ quotasys.c 21 Sep 2009 15:14:48 -0000 1.60
@@ -606,6 +606,10 @@
hlist_allocated = START_MNT_POINTS;
}
+ /* If directories are specified, cache all NFS mountpoints */
+ if (count && !(mntflags & MS_LOCALONLY))
+ mntflags |= MS_NFS_ALL;
+
if (init_mounts_scan(count, mntpoints, mntflags) < 0)
die(2, _("Cannot initialize mountpoint scan.\n"));
while ((mnt = get_next_mount())) {
@@ -987,9 +991,9 @@
continue;
}
if (nfs_fstype(mnt->mnt_type)) {
+ /* For network filesystems we must get device from root */
+ dev = st.st_dev;
if (!(flags & MS_NFS_ALL)) {
- /* For network filesystems we must get device from root */
- dev = st.st_dev;
for (i = 0; i < mnt_entries_cnt && mnt_entries[i].me_dev != dev; i++);
}
else /* Always behave as if the device was unique */