Removed obsoleted references to utime_omit_ok

When issuing an utimensat as a consequence of utime(2) or utimensat(2),
fuse had temporarily defined a flag utime_omit_ok to identify whether
the file system supports the values UTIME_OMIT and UTIME_NOW to mean
specific timestamp updatings. The flag has been obsoleted and all
file system are now supposed to comply with the convention.
This commit is contained in:
Jean-Pierre André 2013-04-22 19:06:49 +02:00
parent baf13fe555
commit c5a11341b0
3 changed files with 1 additions and 21 deletions

View File

@ -422,12 +422,6 @@ struct fuse_operations {
int (*bmap) (const char *, size_t blocksize, uint64_t *idx);
unsigned int flag_nullpath_ok : 1;
/**
* Flag indicating that the filesystem accepts special
* UTIME_NOW and UTIME_OMIT values in its utimens operation.
*/
unsigned int flag_utime_omit_ok : 1;
/**
* Reserved flags, don't set
*/

View File

@ -98,7 +98,6 @@ struct fuse {
struct fuse_config conf;
int intr_installed;
struct fuse_fs *fs;
int utime_omit_ok;
};
struct lock {
@ -1428,7 +1427,7 @@ static void fuse_lib_setattr(fuse_req_t req, fuse_ino_t ino, struct stat *attr,
err = fuse_fs_truncate(f->fs, path, attr->st_size);
}
#ifdef HAVE_UTIMENSAT
if (!err && f->utime_omit_ok &&
if (!err &&
(valid & (FUSE_SET_ATTR_ATIME | FUSE_SET_ATTR_MTIME))) {
struct timespec tv[2];
@ -2998,7 +2997,6 @@ struct fuse *fuse_new(struct fuse_chan *ch, struct fuse_args *args,
goto out_free;
f->fs = fs;
f->utime_omit_ok = fs->op.flag_utime_omit_ok;
/* Oh f**k, this is ugly! */
if (!fs->op.lock) {
@ -3053,10 +3051,6 @@ struct fuse *fuse_new(struct fuse_chan *ch, struct fuse_args *args,
fuse_session_add_chan(f->se, ch);
#ifndef __SOLARIS__
if (f->conf.debug)
fprintf(stderr, "utime_omit_ok: %i\n", f->utime_omit_ok);
#endif /* ! __SOLARIS__ */
f->ctr = 0;
f->generation = 0;
/* FIXME: Dynamic hash table */

View File

@ -3306,14 +3306,6 @@ static void ntfs_fuse_destroy2(void *unused __attribute__((unused)))
}
static struct fuse_operations ntfs_3g_ops = {
#if defined(HAVE_UTIMENSAT) && (defined(FUSE_INTERNAL) || (FUSE_VERSION > 28))
/*
* Accept UTIME_NOW and UTIME_OMIT in utimens, when
* using internal fuse or a fuse version since 2.9
* (this field is not present in older versions)
*/
.flag_utime_omit_ok = 1,
#endif
.getattr = ntfs_fuse_getattr,
.readlink = ntfs_fuse_readlink,
.readdir = ntfs_fuse_readdir,