public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@primarydata.com>
To: chuck.lever@oracle.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH RFC 1/2] nfsdcltrack: use sqlite3_close instead of sqlite3_close_v2
Date: Mon, 17 Nov 2014 13:32:14 -0500	[thread overview]
Message-ID: <1416249135-18736-2-git-send-email-jlayton@primarydata.com> (raw)
In-Reply-To: <1416249135-18736-1-git-send-email-jlayton@primarydata.com>

sqlite3_close_v2 wasn't added until v3.7.14 of libsqlite3 so this causes
the build to fail vs. very old sqlite3 libs. Also, Chuck points out that
the documentation says that sqlite3_close_v2 is intended for use with
host languages that are garbage collected, and C isn't.

In practice, we shouldn't ever see sqlite3_close return SQLITE_BUSY here
anyway since the program is single-threaded, so sqlite3_close should be
fine.

Signed-off-by: Jeff Layton <jlayton@primarydata.com>
---
 utils/nfsdcltrack/sqlite.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/nfsdcltrack/sqlite.c b/utils/nfsdcltrack/sqlite.c
index fb45c4af5edb..7cac89ef459f 100644
--- a/utils/nfsdcltrack/sqlite.c
+++ b/utils/nfsdcltrack/sqlite.c
@@ -357,7 +357,7 @@ sqlite_prepare_dbh(const char *topdir)
 
 	return ret;
 out_close:
-	sqlite3_close_v2(dbh);
+	sqlite3_close(dbh);
 	dbh = NULL;
 	return ret;
 }
-- 
2.1.0


  reply	other threads:[~2014-11-17 18:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-17 18:32 [PATCH RFC 0/2] nfsdcltrack: don't use libsqlite3 functions that are too new Jeff Layton
2014-11-17 18:32 ` Jeff Layton [this message]
2014-11-17 18:32 ` [PATCH RFC 2/2] nfsdcltrack: use sqlite3_errmsg instead of sqlite3_errstr Jeff Layton
2014-11-17 19:04 ` [PATCH RFC 0/2] nfsdcltrack: don't use libsqlite3 functions that are too new Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1416249135-18736-2-git-send-email-jlayton@primarydata.com \
    --to=jlayton@primarydata.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox