Whamcloud - gitweb
LU-8631 quota: better error message for 'lfs quota'
[fs/lustre-release.git] / lustre / utils / liblustreapi.c
index abe6c77..820d28d 100644 (file)
@@ -3525,8 +3525,16 @@ int llapi_is_lustre_mnt(struct mntent *mnt)
 
 int llapi_quotactl(char *mnt, struct if_quotactl *qctl)
 {
-        DIR *root;
-        int rc;
+       char fsname[PATH_MAX + 1];
+       DIR *root;
+       int rc;
+
+       rc = llapi_search_fsname(mnt, fsname);
+       if (rc) {
+               llapi_err_noerrno(LLAPI_MSG_ERROR,
+                                 "'%s' isn't on Lustre filesystem", mnt);
+               return rc;
+       }
 
         root = opendir(mnt);
         if (!root) {