The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/fs/udf/fsync.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * fsync.c
    3  *
    4  * PURPOSE
    5  *  Fsync handling routines for the OSTA-UDF(tm) filesystem.
    6  *
    7  * COPYRIGHT
    8  *  This file is distributed under the terms of the GNU General Public
    9  *  License (GPL). Copies of the GPL can be obtained from:
   10  *      ftp://prep.ai.mit.edu/pub/gnu/GPL
   11  *  Each contributing author retains all rights to their own work.
   12  *
   13  *  (C) 1999-2001 Ben Fennema
   14  *  (C) 1999-2000 Stelias Computing Inc
   15  *
   16  * HISTORY
   17  *
   18  *  05/22/99 blf  Created.
   19  */
   20 
   21 #include "udfdecl.h"
   22 
   23 #include <linux/fs.h>
   24 
   25 static int udf_fsync_inode(struct inode *, int);
   26 
   27 /*
   28  *      File may be NULL when we are called. Perhaps we shouldn't
   29  *      even pass file to fsync ?
   30  */
   31 
   32 int udf_fsync_file(struct file *file, struct dentry *dentry, int datasync)
   33 {
   34         struct inode *inode = dentry->d_inode;
   35 
   36         return udf_fsync_inode(inode, datasync);
   37 }
   38 
   39 static int udf_fsync_inode(struct inode *inode, int datasync)
   40 {
   41         int err;
   42 
   43         err = sync_mapping_buffers(inode->i_mapping);
   44         if (!(inode->i_state & I_DIRTY))
   45                 return err;
   46         if (datasync && !(inode->i_state & I_DIRTY_DATASYNC))
   47                 return err;
   48 
   49         err |= udf_sync_inode(inode);
   50 
   51         return err ? -EIO : 0;
   52 }

Cache object: 8bc56f97f5f59d1e06affc353b5a9e0d


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.