mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-08 08:58:50 +03:00
dec use count on close. corrects a typo.
Really the use counts on these modules should be handled at a higher level, otherwise there are races I think.
This commit is contained in:
parent
da44380f86
commit
9404455a07
@ -121,7 +121,7 @@
|
||||
* writes got copied to both destinations correctly. Great for
|
||||
* implementing pvmove. Not sure how userland would be notified that
|
||||
* the copying process had completed. Possibly by reading a /proc entry
|
||||
* for the LV.
|
||||
* for the LV. Could also use poll() for this kind of thing.
|
||||
*/
|
||||
|
||||
#define MAX_DEVICES 64
|
||||
@ -229,7 +229,7 @@ static int _blk_open(struct inode *inode, struct file *file)
|
||||
md->in_use++;
|
||||
spin_unlock(&md->lock);
|
||||
|
||||
MOD_INC_USE_COUNT;
|
||||
MOD_INC_USE_COUNT; /* isn't this done by blk layer ? it should be */
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -252,7 +252,7 @@ static int _blk_close(struct inode *inode, struct file *file)
|
||||
md->in_use--;
|
||||
spin_unlock(&md->lock);
|
||||
|
||||
MOD_INC_USE_COUNT;
|
||||
MOD_DEC_USE_COUNT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user