Check error code of path_lookup() on pre-39 kernels. Suggested by Lev Vainblat <lev@zadarastorage.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3939 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2011-11-23 02:53:09 +00:00
parent 2ff0f44c4c
commit a309a526f0

View File

@@ -1185,7 +1185,8 @@ static int scst_pr_check_pr_path(void)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
res = path_lookup(SCST_PR_DIR, 0, &nd);
scst_pr_path_put(&nd);
if (res == 0)
scst_pr_path_put(&nd);
#else
res = kern_path(SCST_PR_DIR, 0, &path);
if (res == 0)