Chunwei Chen
7dc71949f2
Fix z_sync_cnt decrement in zfs_close
...
The comment in zfs_close states that "Under Linux the zfs_close() hook
is not symmetric with zfs_open()". This is not true. zfs_open/zfs_close
is associated with every successful struct file creation/deletion, which
should always be balanced.
Here is an example of what's wrong:
Process A B
open(O_SYNC)
z_sync_cnt = 1
open(O_SYNC)
z_sync_cnt = 2
close()
z_sync_cnt = 0
So z_sync_cnt is 0 even if B still has the file with O_SYNC.
Also moves the generic_file_open call before zfs_open to ensure that in
the case generic_file_open fails z_sync_cnt is not incremented. This
is safe because generic_file_open has no side effects.
Signed-off-by: Chunwei Chen <tuxoko@gmail.com >
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov >
Issue #1962
2013-12-17 10:28:27 -08:00
..
2013-12-10 10:05:40 -08:00
2013-09-04 16:01:24 -07:00
2013-10-31 14:57:51 -07:00
2013-11-05 13:18:26 -08:00
2013-10-25 13:59:40 -07:00
2013-12-06 09:32:43 -08:00
2012-10-29 08:57:45 -07:00
2013-10-31 14:58:04 -07:00
2013-10-31 14:58:04 -07:00
2013-10-31 14:58:04 -07:00
2013-12-06 09:32:43 -08:00
2013-11-05 12:23:35 -08:00
2013-11-14 14:28:12 -08:00
2013-12-06 09:32:43 -08:00
2013-12-06 09:32:43 -08:00
2013-12-06 09:32:43 -08:00
2013-11-04 10:55:25 -08:00
2013-12-06 09:32:43 -08:00
2013-12-16 09:15:57 -08:00
2013-01-08 10:35:43 -08:00
2013-10-31 14:58:04 -07:00
2013-11-05 12:23:35 -08:00
2013-12-16 09:15:57 -08:00
2013-12-06 09:32:43 -08:00
2013-11-04 10:55:25 -08:00
2013-12-06 09:32:43 -08:00
2013-10-31 14:58:04 -07:00
2013-12-02 14:02:46 -08:00
2012-10-15 16:01:54 -07:00
2010-08-31 08:38:46 -07:00
2013-10-22 10:12:39 -07:00
2013-10-30 14:51:27 -07:00
2013-10-25 13:59:40 -07:00
2013-11-05 12:25:44 -08:00
2013-09-04 16:01:24 -07:00
2013-09-25 15:44:22 -07:00
2013-12-10 09:48:15 -08:00
2010-08-31 13:41:59 -07:00
2010-08-31 13:41:58 -07:00
2013-11-05 12:23:05 -08:00
2013-11-04 10:55:25 -08:00
2013-10-31 14:58:04 -07:00
2013-12-06 09:32:43 -08:00
2013-10-31 09:16:03 -07:00
2013-12-06 09:32:43 -08:00
2013-09-04 16:01:24 -07:00
2013-12-06 09:32:43 -08:00
2013-10-31 14:58:04 -07:00
2012-08-27 12:01:37 -07:00
2013-12-06 09:32:43 -08:00
2013-10-31 14:58:04 -07:00
2013-11-05 12:17:07 -08:00
2013-12-12 10:24:01 -08:00
2013-12-06 09:32:43 -08:00
2013-10-31 14:58:04 -07:00
2013-12-06 09:32:43 -08:00
2013-12-06 09:32:43 -08:00
2013-10-31 14:58:04 -07:00
2013-12-06 09:32:43 -08:00
2013-10-31 14:58:04 -07:00
2013-10-31 14:58:04 -07:00
2013-11-04 10:55:25 -08:00
2013-01-29 09:28:20 -08:00
2013-10-31 14:58:04 -07:00
2013-11-04 10:55:25 -08:00
2010-08-31 13:41:58 -07:00
2013-11-08 10:45:14 -08:00
2013-11-05 13:18:26 -08:00
2013-12-06 09:30:51 -08:00
2013-12-06 09:32:43 -08:00
2013-10-30 14:51:27 -07:00
2013-12-16 09:41:39 -08:00
2013-11-23 15:08:29 -08:00
2013-10-31 14:58:04 -07:00
2013-10-31 14:58:04 -07:00
2013-11-04 10:55:25 -08:00
2013-11-04 10:55:25 -08:00
2013-12-02 15:58:58 -08:00
2013-12-17 10:28:27 -08:00
2013-12-12 10:23:58 -08:00
2013-12-06 09:32:43 -08:00
2013-10-31 14:58:04 -07:00
2013-10-31 14:58:04 -07:00
2013-10-31 14:58:04 -07:00
2013-12-06 09:32:43 -08:00
2010-05-28 13:45:14 -07:00
2013-12-06 09:42:39 -08:00
2012-10-03 10:49:45 -07:00
2013-12-17 10:28:27 -08:00
2013-11-14 14:28:35 -08:00
2013-11-05 16:22:05 -08:00
2013-12-10 09:48:30 -08:00
2010-09-17 16:24:15 -07:00
2013-12-16 09:41:45 -08:00