From 6dbfae4e2bafac8dabab003814fbe58de0c8a594 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Tue, 24 Apr 2012 11:54:58 +0200 Subject: removed 'path' in schema, translating path now iteratively to id via the 'parent_id' --- pgfuse.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) (limited to 'pgfuse.c') diff --git a/pgfuse.c b/pgfuse.c index 1fa9ded..52ee0d7 100644 --- a/pgfuse.c +++ b/pgfuse.c @@ -720,43 +720,14 @@ static int pgfuse_fsync( const char *path, int isdatasync, struct fuse_file_info static int pgfuse_release( const char *path, struct fuse_file_info *fi ) { PgFuseData *data = (PgFuseData *)fuse_get_context( )->private_data; - int id; - int res; - PgMeta meta; - PGconn *conn; + /* nothing to do given the simple transaction model */ + if( data->verbose ) { syslog( LOG_INFO, "Releasing '%s' on '%s', thread #%u", path, data->mountpoint, THREAD_ID ); } - ACQUIRE( conn ); - PSQL_BEGIN( conn ); - - if( fi->fh == 0 ) { - PSQL_ROLLBACK( conn ); RELEASE( conn ); - return -EBADF; - } - - if( data->read_only ) { - PSQL_ROLLBACK( conn ); RELEASE( conn ); - return 0; - } - - id = psql_get_meta( conn, path, &meta ); - if( id < 0 ) { - PSQL_ROLLBACK( conn ); RELEASE( conn ); - return id; - } - - res = psql_write_meta( conn, id, path, meta ); - if( res < 0 ) { - PSQL_ROLLBACK( conn ); RELEASE( conn ); - return res; - } - - PSQL_COMMIT( conn ); RELEASE( conn ); - return 0; } -- cgit v1.2.3-54-g00ecf