Skip to content

Commit

Permalink
fs: remove the never implemented aio_fsync file operation
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Christoph Hellwig authored and Al Viro committed Oct 30, 2016
1 parent 0b944d3 commit 723c038
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 19 deletions.
1 change: 0 additions & 1 deletion Documentation/filesystems/Locking
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,6 @@ prototypes:
int (*flush) (struct file *);
int (*release) (struct inode *, struct file *);
int (*fsync) (struct file *, loff_t start, loff_t end, int datasync);
int (*aio_fsync) (struct kiocb *, int datasync);
int (*fasync) (int, struct file *, int);
int (*lock) (struct file *, int, struct file_lock *);
ssize_t (*readv) (struct file *, const struct iovec *, unsigned long,
Expand Down
1 change: 0 additions & 1 deletion Documentation/filesystems/vfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,6 @@ struct file_operations {
int (*flush) (struct file *, fl_owner_t id);
int (*release) (struct inode *, struct file *);
int (*fsync) (struct file *, loff_t, loff_t, int datasync);
int (*aio_fsync) (struct kiocb *, int datasync);
int (*fasync) (int, struct file *, int);
int (*lock) (struct file *, int, struct file_lock *);
ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
Expand Down
14 changes: 0 additions & 14 deletions fs/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1472,20 +1472,6 @@ static ssize_t aio_run_iocb(struct kiocb *req, unsigned opcode,
kfree(iovec);
break;

case IOCB_CMD_FDSYNC:
if (!file->f_op->aio_fsync)
return -EINVAL;

ret = file->f_op->aio_fsync(req, 1);
break;

case IOCB_CMD_FSYNC:
if (!file->f_op->aio_fsync)
return -EINVAL;

ret = file->f_op->aio_fsync(req, 0);
break;

default:
pr_debug("EINVAL: no operation provided\n");
return -EINVAL;
Expand Down
2 changes: 0 additions & 2 deletions fs/ntfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1544,8 +1544,6 @@ const struct file_operations ntfs_dir_ops = {
.iterate = ntfs_readdir, /* Read directory contents. */
#ifdef NTFS_RW
.fsync = ntfs_dir_fsync, /* Sync a directory to disk. */
/*.aio_fsync = ,*/ /* Sync all outstanding async
i/o operations on a kiocb. */
#endif /* NTFS_RW */
/*.ioctl = ,*/ /* Perform function on the
mounted filesystem. */
Expand Down
1 change: 0 additions & 1 deletion include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,6 @@ struct file_operations {
int (*flush) (struct file *, fl_owner_t id);
int (*release) (struct inode *, struct file *);
int (*fsync) (struct file *, loff_t, loff_t, int datasync);
int (*aio_fsync) (struct kiocb *, int datasync);
int (*fasync) (int, struct file *, int);
int (*lock) (struct file *, int, struct file_lock *);
ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
Expand Down

0 comments on commit 723c038

Please sign in to comment.