--- sysquotas.c 2010-11-01 11:31:47.000000000 +0900 +++ sysquotas.c.org 2010-11-01 11:16:26.000000000 +0900 @@ -416,17 +416,17 @@ if (!path||!dp) smb_panic("sys_get_quota: called with NULL pointer"); - if ((ret=sys_path_to_bdev(path,&mntpath,&bdev,&fs))!=0) { - DEBUG(0,("sys_path_to_bdev() failed for path [%s]!\n",path)); - return ret; - } - - if (command_get_quota(bdev, qtype, id, dp)==0) { + if (command_get_quota(path, qtype, id, dp)==0) { return 0; } else if (errno != ENOSYS) { return -1; } + if ((ret=sys_path_to_bdev(path,&mntpath,&bdev,&fs))!=0) { + DEBUG(0,("sys_path_to_bdev() failed for path [%s]!\n",path)); + return ret; + } + errno = 0; DEBUG(10,("sys_get_quota() uid(%u, %u)\n", (unsigned)getuid(), (unsigned)geteuid()));